[Mesa-dev] [PATCH v2 27/40] pipe-loader: add preliminary scons support

Emil Velikov emil.l.velikov at gmail.com
Fri Nov 20 12:11:36 PST 2015


Add a 'static' pipe-loader build, which will be used with follow-up
commits.

Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>
Acked-by: Rob Clark <robclark at freedesktop.org>
---
 src/gallium/SConscript                        |  1 +
 src/gallium/auxiliary/pipe-loader/Makefile.am |  2 ++
 src/gallium/auxiliary/pipe-loader/SConscript  | 34 +++++++++++++++++++++++++++
 3 files changed, 37 insertions(+)
 create mode 100644 src/gallium/auxiliary/pipe-loader/SConscript

diff --git a/src/gallium/SConscript b/src/gallium/SConscript
index fa5fa6e..0c3a374 100644
--- a/src/gallium/SConscript
+++ b/src/gallium/SConscript
@@ -5,6 +5,7 @@ Import('env')
 #
 
 SConscript('auxiliary/SConscript')
+SConscript('auxiliary/pipe-loader/SConscript')
 
 #
 # Drivers
diff --git a/src/gallium/auxiliary/pipe-loader/Makefile.am b/src/gallium/auxiliary/pipe-loader/Makefile.am
index 6a4a667..f661897 100644
--- a/src/gallium/auxiliary/pipe-loader/Makefile.am
+++ b/src/gallium/auxiliary/pipe-loader/Makefile.am
@@ -44,3 +44,5 @@ libpipe_loader_dynamic_la_LIBADD = \
 	$(top_builddir)/src/loader/libloader.la
 
 endif
+
+EXTRA_DIST = SConscript
diff --git a/src/gallium/auxiliary/pipe-loader/SConscript b/src/gallium/auxiliary/pipe-loader/SConscript
new file mode 100644
index 0000000..393b602
--- /dev/null
+++ b/src/gallium/auxiliary/pipe-loader/SConscript
@@ -0,0 +1,34 @@
+Import('*')
+
+env = env.Clone()
+
+env.MSVC2008Compat()
+
+env.Append(CPPPATH = [
+    '#/src/loader',
+    '#/src/gallium/winsys',
+])
+
+env.Append(CPPDEFINES = [
+    ('HAVE_PIPE_LOADER_DRI', '1'),
+    ('DROP_PIPE_LOADER_MISC', '1'),
+    ('GALLIUM_STATIC_TARGETS', '1'),
+])
+
+source = env.ParseSourceList('Makefile.sources', 'COMMON_SOURCES')
+
+#if HAVE_LIBDRM
+source += env.ParseSourceList('Makefile.sources', 'DRM_SOURCES')
+
+env.PkgUseModules('DRM')
+env.Append(LIBS = [libloader])
+#endif
+
+pipe_loader = env.ConvenienceLibrary(
+    target = 'pipe_loader',
+    source = source,
+)
+
+env.Alias('pipe_loader', pipe_loader)
+
+Export('pipe_loader')
-- 
2.6.2



More information about the mesa-dev mailing list