pipe-loader: add a dummy 'static' pipe-loader
authorEmil Velikov <emil.l.velikov@gmail.com>
Tue, 13 Oct 2015 17:07:11 +0000 (18:07 +0100)
committerEmil Velikov <emil.l.velikov@gmail.com>
Sat, 21 Nov 2015 12:52:19 +0000 (12:52 +0000)
It is to be used in contrast of the dynamic one. The state-tracker does
not need to know if the pipe-driver is built into the final blob or
a separate object. This will allow us to move the logic to the final
step (in target) where the appropriate pipe-loader will be chosen.

Cc: Tom Stellard <thomas.stellard@amd.com>
Cc: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Acked-by: Rob Clark <robclark@freedesktop.org>
src/gallium/auxiliary/pipe-loader/Makefile.am

index 974cf08a10bc74802a0b4011df543bdc75b1ace4..6a4a667ab0fe99a57fc6479e6b824f43bacadbbf 100644 (file)
@@ -5,12 +5,24 @@ include $(top_srcdir)/src/gallium/Automake.inc
 AM_CFLAGS = \
        -I$(top_srcdir)/src/loader \
        -I$(top_srcdir)/src/gallium/winsys \
-       -DPIPE_SEARCH_DIR=\"$(libdir)/gallium-pipe\" \
        $(GALLIUM_PIPE_LOADER_DEFINES) \
        $(GALLIUM_CFLAGS) \
        $(VISIBILITY_CFLAGS)
 
-noinst_LTLIBRARIES = libpipe_loader_dynamic.la
+noinst_LTLIBRARIES = \
+       libpipe_loader_static.la \
+       libpipe_loader_dynamic.la
+
+libpipe_loader_static_la_CFLAGS = \
+       $(AM_CFLAGS) \
+       -DGALLIUM_STATIC_TARGETS=1
+
+libpipe_loader_dynamic_la_CFLAGS = \
+       $(AM_CFLAGS) \
+       -DPIPE_SEARCH_DIR=\"$(libdir)/gallium-pipe\"
+
+libpipe_loader_static_la_SOURCES = \
+       $(COMMON_SOURCES)
 
 libpipe_loader_dynamic_la_SOURCES = \
        $(COMMON_SOURCES)
@@ -19,11 +31,16 @@ if HAVE_LIBDRM
 AM_CFLAGS += \
        $(LIBDRM_CFLAGS)
 
+libpipe_loader_static_la_SOURCES += \
+       $(DRM_SOURCES)
+
 libpipe_loader_dynamic_la_SOURCES += \
        $(DRM_SOURCES)
 
+libpipe_loader_static_la_LIBADD = \
+       $(top_builddir)/src/loader/libloader.la
+
 libpipe_loader_dynamic_la_LIBADD = \
        $(top_builddir)/src/loader/libloader.la
 
 endif
-