winsys/i915: share the source list
authorChia-I Wu <olv@lunarg.com>
Mon, 22 Aug 2011 03:09:20 +0000 (11:09 +0800)
committerChia-I Wu <olvaffe@gmail.com>
Sat, 27 Aug 2011 09:28:32 +0000 (17:28 +0800)
Factor out C_SOURCES from Makefile to Makefile.sources, and let Makefile
and SConscript share it.

src/gallium/winsys/i915/drm/Makefile
src/gallium/winsys/i915/drm/Makefile.sources [new file with mode: 0644]
src/gallium/winsys/i915/drm/SConscript

index 1977de1fb09905a98d911621477ec9300569a67d..37307ca8a4b23f70ca407e6478089a7350df74b0 100644 (file)
@@ -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 (file)
index 0000000..1857442
--- /dev/null
@@ -0,0 +1,5 @@
+C_SOURCES := \
+       i915_drm_batchbuffer.c \
+       i915_drm_buffer.c \
+       i915_drm_fence.c \
+       i915_drm_winsys.c
index 15c97998fd8f710dbf2768e166ecddd439229237..3d276288105ae0c59cd036cc96ab1a9fd2a7ab71 100644 (file)
@@ -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',