[Mesa-dev] [PATCH 2/4] winsys/r600: share the source list

Chia-I Wu olvaffe at gmail.com
Tue Aug 23 20:08:43 PDT 2011


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

diff --git a/src/gallium/winsys/r600/drm/Makefile b/src/gallium/winsys/r600/drm/Makefile
index 5ad183d..c23286c 100644
--- a/src/gallium/winsys/r600/drm/Makefile
+++ b/src/gallium/winsys/r600/drm/Makefile
@@ -4,12 +4,8 @@ include $(TOP)/configs/current
 
 LIBNAME = r600winsys
 
-C_SOURCES = \
-	evergreen_hw_context.c \
-	radeon_pciid.c \
-	r600_bo.c \
-	r600_drm.c \
-	r600_hw_context.c
+# get C_SOURCES
+include Makefile.sources
 
 LIBRARY_INCLUDES = -I$(TOP)/src/gallium/drivers/r600 \
 		   -I$(TOP)/include \
diff --git a/src/gallium/winsys/r600/drm/Makefile.sources b/src/gallium/winsys/r600/drm/Makefile.sources
new file mode 100644
index 0000000..9798017
--- /dev/null
+++ b/src/gallium/winsys/r600/drm/Makefile.sources
@@ -0,0 +1,7 @@
+C_SOURCES := \
+	evergreen_hw_context.c \
+	radeon_pciid.c \
+	r600_bo.c \
+	r600_drm.c \
+	r600_hw_context.c
+
diff --git a/src/gallium/winsys/r600/drm/SConscript b/src/gallium/winsys/r600/drm/SConscript
index ca51b52..2d0d80e 100644
--- a/src/gallium/winsys/r600/drm/SConscript
+++ b/src/gallium/winsys/r600/drm/SConscript
@@ -2,13 +2,7 @@ Import('*')
 
 env = env.Clone()
 
-r600_sources = [
-    'evergreen_hw_context.c',
-    'radeon_pciid.c',
-    'r600_bo.c',
-    'r600_drm.c',
-    'r600_hw_context.c',
-]
+r600_sources = env.ParseSourceList('Makefile.sources', 'C_SOURCES')
 
 env.PkgUseModules('DRM_RADEON')
 
-- 
1.7.5.4



More information about the mesa-dev mailing list