[Mesa-dev] [PATCH 08/12] winsys/i915: share the source list

Chia-I Wu olvaffe at gmail.com
Wed Aug 24 21:56:01 PDT 2011


From: Chia-I Wu <olv at lunarg.com>

Factor out C_SOURCES from Makefile to Makefile.sources, and let Makefile
and SConscript share it.
---
 src/gallium/winsys/i915/drm/Makefile         |    7 ++-----
 src/gallium/winsys/i915/drm/Makefile.sources |    5 +++++
 src/gallium/winsys/i915/drm/SConscript       |    7 +------
 3 files changed, 8 insertions(+), 11 deletions(-)
 create mode 100644 src/gallium/winsys/i915/drm/Makefile.sources

diff --git a/src/gallium/winsys/i915/drm/Makefile b/src/gallium/winsys/i915/drm/Makefile
index 1977de1..37307ca 100644
--- a/src/gallium/winsys/i915/drm/Makefile
+++ b/src/gallium/winsys/i915/drm/Makefile
@@ -3,11 +3,8 @@ include $(TOP)/configs/current
 
 LIBNAME = i915drm
 
-C_SOURCES = \
-	i915_drm_batchbuffer.c \
-	i915_drm_buffer.c \
-	i915_drm_fence.c \
-	i915_drm_winsys.c
+# get C_SOURCES
+include Makefile.sources
 
 LIBRARY_INCLUDES = $(shell pkg-config libdrm --cflags-only-I)
 
diff --git a/src/gallium/winsys/i915/drm/Makefile.sources b/src/gallium/winsys/i915/drm/Makefile.sources
new file mode 100644
index 0000000..1857442
--- /dev/null
+++ b/src/gallium/winsys/i915/drm/Makefile.sources
@@ -0,0 +1,5 @@
+C_SOURCES := \
+	i915_drm_batchbuffer.c \
+	i915_drm_buffer.c \
+	i915_drm_fence.c \
+	i915_drm_winsys.c
diff --git a/src/gallium/winsys/i915/drm/SConscript b/src/gallium/winsys/i915/drm/SConscript
index 15c9799..d493e01 100644
--- a/src/gallium/winsys/i915/drm/SConscript
+++ b/src/gallium/winsys/i915/drm/SConscript
@@ -4,12 +4,7 @@ env = env.Clone()
 
 env.PkgUseModules('DRM')
 
-i915drm_sources = [
-    'i915_drm_batchbuffer.c',
-    'i915_drm_buffer.c',
-    'i915_drm_fence.c',
-    'i915_drm_winsys.c',
-]
+i915drm_sources = env.ParseSourceList['Makefile.sources', 'C_SOURCES']
 
 i915drm = env.ConvenienceLibrary(
     target ='i915drm',
-- 
1.7.5.4



More information about the mesa-dev mailing list