winsys/r600: share the source list
authorChia-I Wu <olvaffe@gmail.com>
Fri, 19 Aug 2011 06:58:57 +0000 (14:58 +0800)
committerChia-I Wu <olv@lunarg.com>
Thu, 25 Aug 2011 00:54:16 +0000 (08:54 +0800)
Factor out C_SOURCES from Makefile to Makefile.sources, and let
Makefile and SConscript share it.

Reviewed-by: Marek Olšák <maraeo@gmail.com>
src/gallium/winsys/r600/drm/Makefile
src/gallium/winsys/r600/drm/Makefile.sources [new file with mode: 0644]
src/gallium/winsys/r600/drm/SConscript

index 5ad183d78ae485e39ecfe5e26759fe959643e4e4..c23286c81972765588953b4859c63a73b75e6043 100644 (file)
@@ -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 (file)
index 0000000..9798017
--- /dev/null
@@ -0,0 +1,7 @@
+C_SOURCES := \
+       evergreen_hw_context.c \
+       radeon_pciid.c \
+       r600_bo.c \
+       r600_drm.c \
+       r600_hw_context.c
+
index ca51b52ea7233892301924de5f3645c3587152df..2d0d80e8bb9f3980a277fb5ab805da5905467684 100644 (file)
@@ -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')