Mesa (master): winsys/radeon: share the source list

Chia-I Wu olv at kemper.freedesktop.org
Wed Aug 24 18:35:52 PDT 2011


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

Author: Chia-I Wu <olvaffe at gmail.com>
Date:   Fri Aug 19 15:00:20 2011 +0800

winsys/radeon: share the source list

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

Reviewed-by: Marek Olšák <maraeo at gmail.com>

---

 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(-)

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')
 



More information about the mesa-commit mailing list