[Mesa-dev] [PATCH 22/23] targets/opencl: initial pass of opencl-static

Emil Velikov emil.l.velikov at gmail.com
Sun May 18 00:07:44 PDT 2014


Currently it only moves variables around to ease future
integration of statically linked drivers in opencl.

Needs some work on the state-tracker.

Cc: Francisco Jerez <currojerez at riseup.net>
Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>
---
 src/gallium/state_trackers/clover/Makefile.am |  7 ++++--
 src/gallium/targets/opencl/Makefile.am        | 36 +++++++++++++++++++--------
 2 files changed, 31 insertions(+), 12 deletions(-)

diff --git a/src/gallium/state_trackers/clover/Makefile.am b/src/gallium/state_trackers/clover/Makefile.am
index 5e6f908..141e7bc 100644
--- a/src/gallium/state_trackers/clover/Makefile.am
+++ b/src/gallium/state_trackers/clover/Makefile.am
@@ -7,11 +7,14 @@ AM_CPPFLAGS = \
 	-DPIPE_SEARCH_DIR=\"$(libdir)/gallium-pipe\" \
 	-I$(top_srcdir)/include \
 	-I$(top_srcdir)/src/gallium/include \
-	-I$(top_srcdir)/src/gallium/drivers \
 	-I$(top_srcdir)/src/gallium/auxiliary \
-	-I$(top_srcdir)/src/gallium/winsys \
 	-I$(srcdir)
 
+if HAVE_GALLIUM_STATIC_TARGETS
+AM_CPPFLAGS += \
+	-DGALLIUM_STATIC_TARGETS=1
+endif
+
 if HAVE_CLOVER_ICD
 AM_CPPFLAGS += -DHAVE_CLOVER_ICD
 else
diff --git a/src/gallium/targets/opencl/Makefile.am b/src/gallium/targets/opencl/Makefile.am
index bbc44c9..2172217 100644
--- a/src/gallium/targets/opencl/Makefile.am
+++ b/src/gallium/targets/opencl/Makefile.am
@@ -2,8 +2,16 @@ AUTOMAKE_OPTIONS = subdir-objects
 
 include $(top_srcdir)/src/gallium/Automake.inc
 
+if HAVE_CLOVER_ICD
+icddir = /etc/OpenCL/vendors/
+icd_DATA = mesa.icd
+endif
+
 lib_LTLIBRARIES = lib at OPENCL_LIBNAME@.la
 
+nodist_EXTRA_lib at OPENCL_LIBNAME@_la_SOURCES = dummy.cpp
+lib at OPENCL_LIBNAME@_la_SOURCES =
+
 lib at OPENCL_LIBNAME@_la_LDFLAGS = \
 	$(LLVM_LDFLAGS) \
 	-no-undefined \
@@ -14,9 +22,6 @@ lib at OPENCL_LIBNAME@_la_LDFLAGS = \
 
 
 lib at OPENCL_LIBNAME@_la_LIBADD = \
-	$(GALLIUM_PIPE_LOADER_CLIENT_LIBS) \
-	$(GALLIUM_PIPE_LOADER_WINSYS_LIBS) \
-	$(top_builddir)/src/gallium/auxiliary/pipe-loader/libpipe_loader_client.la \
 	$(top_builddir)/src/gallium/state_trackers/clover/libclover.la \
 	$(top_builddir)/src/gallium/auxiliary/libgallium.la \
 	-ldl \
@@ -35,13 +40,24 @@ lib at OPENCL_LIBNAME@_la_LIBADD = \
 	-lclangBasic \
 	$(LLVM_LIBS)
 
-nodist_EXTRA_lib at OPENCL_LIBNAME@_la_SOURCES = dummy.cpp
-lib at OPENCL_LIBNAME@_la_SOURCES =
-
+#if HAVE_GALLIUM_STATIC_TARGETS
+#
+#lib at OPENCL_LIBNAME@_la_SOURCES += target.c
+#lib at OPENCL_LIBNAME@_la_CPPFLAGS = $(STATIC_TARGET_CPPFLAGS)
+#lib at OPENCL_LIBNAME@_la_LIBADD += $(STATIC_TARGET_LIB_DEPS)
+#
+#if HAVE_GALLIUM_R300
+#lib at OPENCL_LIBNAME@_la_LIBADD += \
+#	$(top_builddir)/src/gallium/drivers/r300/libr300-helper.la
+#endif
+#
+#else # HAVE_GALLIUM_STATIC_TARGETS
+
+lib at OPENCL_LIBNAME@_la_LIBADD += \
+	$(top_builddir)/src/gallium/auxiliary/pipe-loader/libpipe_loader_client.la \
+	$(GALLIUM_PIPE_LOADER_CLIENT_LIBS) \
+	$(GALLIUM_PIPE_LOADER_WINSYS_LIBS)
 
-if HAVE_CLOVER_ICD
-icddir = /etc/OpenCL/vendors/
-icd_DATA = mesa.icd
-endif
+#endif # HAVE_GALLIUM_STATIC_TARGETS
 
 include $(top_srcdir)/install-gallium-links.mk
-- 
1.9.2



More information about the mesa-dev mailing list