[Mesa-dev] [PATCH 3/4] winsys/radeon: share the source list

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


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

diff --git a/src/gallium/winsys/radeon/drm/Makefile b/src/gallium/winsys/radeon/drm/Makefile
index 913e6ad..68b9efe 100644
--- a/src/gallium/winsys/radeon/drm/Makefile
+++ b/src/gallium/winsys/radeon/drm/Makefile
@@ -4,10 +4,8 @@ include $(TOP)/configs/current
 
 LIBNAME = radeonwinsys
 
-C_SOURCES = \
-	radeon_drm_bo.c \
-	radeon_drm_cs.c \
-	radeon_drm_winsys.c
+# get C_SOURCES
+include Makefile.sources
 
 LIBRARY_INCLUDES = -I$(TOP)/include \
 		   $(shell pkg-config libdrm --cflags-only-I)
diff --git a/src/gallium/winsys/radeon/drm/Makefile.sources b/src/gallium/winsys/radeon/drm/Makefile.sources
new file mode 100644
index 0000000..1d18d61
--- /dev/null
+++ b/src/gallium/winsys/radeon/drm/Makefile.sources
@@ -0,0 +1,4 @@
+C_SOURCES := \
+	radeon_drm_bo.c \
+	radeon_drm_cs.c \
+	radeon_drm_winsys.c
diff --git a/src/gallium/winsys/radeon/drm/SConscript b/src/gallium/winsys/radeon/drm/SConscript
index 2edb1e9..e5048d6 100644
--- a/src/gallium/winsys/radeon/drm/SConscript
+++ b/src/gallium/winsys/radeon/drm/SConscript
@@ -2,11 +2,7 @@ Import('*')
 
 env = env.Clone()
 
-radeon_sources = [
-    'radeon_drm_bo.c',
-    'radeon_drm_cs.c',
-    'radeon_drm_winsys.c',
-]
+radeon_sources = env.ParseSourceList('Makefile.sources', 'C_SOURCES')
 
 env.PkgUseModules('DRM')
 
-- 
1.7.5.4



More information about the mesa-dev mailing list