Mesa (master): i915g: share the source list

Chia-I Wu olv at kemper.freedesktop.org
Sat Aug 27 09:57:09 UTC 2011


Module: Mesa
Branch: master
Commit: a558bf69cb2ec21ad40d9d1f829036ee8b817def
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=a558bf69cb2ec21ad40d9d1f829036ee8b817def

Author: Chia-I Wu <olv at lunarg.com>
Date:   Mon Aug 22 11:07:26 2011 +0800

i915g: share the source list

Factor out C_SOURCES from Makefile to Makefile.sources, and let Makefile
and SConscript share it.

---

 src/gallium/drivers/i915/Makefile         |   28 ++--------------------------
 src/gallium/drivers/i915/Makefile.sources |   26 ++++++++++++++++++++++++++
 src/gallium/drivers/i915/SConscript       |   29 ++---------------------------
 3 files changed, 30 insertions(+), 53 deletions(-)

diff --git a/src/gallium/drivers/i915/Makefile b/src/gallium/drivers/i915/Makefile
index 36197fb..0e57678 100644
--- a/src/gallium/drivers/i915/Makefile
+++ b/src/gallium/drivers/i915/Makefile
@@ -3,31 +3,7 @@ include $(TOP)/configs/current
 
 LIBNAME = i915
 
-C_SOURCES = \
-	i915_blit.c \
-	i915_clear.c \
-	i915_flush.c \
-	i915_context.c \
-	i915_debug.c \
-	i915_debug_fp.c \
-	i915_state.c \
-	i915_state_immediate.c \
-	i915_state_dynamic.c \
-	i915_state_derived.c \
-	i915_state_emit.c \
-	i915_state_fpc.c \
-	i915_state_sampler.c \
-	i915_state_static.c \
-	i915_screen.c \
-	i915_prim_emit.c \
-	i915_prim_vbuf.c \
-	i915_query.c \
-	i915_resource.c \
-	i915_resource_texture.c \
-	i915_resource_buffer.c \
-	i915_fpc_emit.c \
-	i915_fpc_translate.c \
-	i915_fpc_optimize.c \
-	i915_surface.c 
+# get C_SOURCES
+include Makefile.sources
 
 include ../../Makefile.template
diff --git a/src/gallium/drivers/i915/Makefile.sources b/src/gallium/drivers/i915/Makefile.sources
new file mode 100644
index 0000000..80c7689
--- /dev/null
+++ b/src/gallium/drivers/i915/Makefile.sources
@@ -0,0 +1,26 @@
+C_SOURCES := \
+	i915_blit.c \
+	i915_clear.c \
+	i915_flush.c \
+	i915_context.c \
+	i915_debug.c \
+	i915_debug_fp.c \
+	i915_state.c \
+	i915_state_immediate.c \
+	i915_state_dynamic.c \
+	i915_state_derived.c \
+	i915_state_emit.c \
+	i915_state_fpc.c \
+	i915_state_sampler.c \
+	i915_state_static.c \
+	i915_screen.c \
+	i915_prim_emit.c \
+	i915_prim_vbuf.c \
+	i915_query.c \
+	i915_resource.c \
+	i915_resource_texture.c \
+	i915_resource_buffer.c \
+	i915_fpc_emit.c \
+	i915_fpc_translate.c \
+	i915_fpc_optimize.c \
+	i915_surface.c 
diff --git a/src/gallium/drivers/i915/SConscript b/src/gallium/drivers/i915/SConscript
index 76f5970..22de67d 100644
--- a/src/gallium/drivers/i915/SConscript
+++ b/src/gallium/drivers/i915/SConscript
@@ -4,33 +4,8 @@ env = env.Clone()
 
 i915 = env.ConvenienceLibrary(
 	target = 'i915',
-	source = [
-		'i915_blit.c',
-		'i915_resource_buffer.c',
-		'i915_clear.c',
-		'i915_context.c',
-		'i915_debug.c',
-		'i915_debug_fp.c',
-		'i915_flush.c',
-		'i915_fpc_emit.c',
-		'i915_fpc_translate.c',
-		'i915_fpc_optimize.c',
-		'i915_prim_emit.c',
-		'i915_prim_vbuf.c',
-		'i915_query.c',
-		'i915_screen.c',
-		'i915_state.c',
-		'i915_state_derived.c',
-		'i915_state_dynamic.c',
-		'i915_state_fpc.c',
-		'i915_state_emit.c',
-		'i915_state_immediate.c',
-		'i915_state_sampler.c',
-		'i915_state_static.c',
-		'i915_surface.c',
-		'i915_resource.c',
-		'i915_resource_texture.c',
-	])
+	source = env.ParseSourceList('Makefile.sources', 'C_SOURCES')
+	)
 
 env.Alias('i915', i915)
 




More information about the mesa-commit mailing list