[Mesa-dev] [PATCH 07/12] winsys/svga: share the source list

Chia-I Wu olvaffe at gmail.com
Wed Aug 24 21:56:00 PDT 2011


From: Chia-I Wu <olv at lunarg.com>

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

diff --git a/src/gallium/winsys/svga/drm/Makefile b/src/gallium/winsys/svga/drm/Makefile
index c2f59e0..a378900 100644
--- a/src/gallium/winsys/svga/drm/Makefile
+++ b/src/gallium/winsys/svga/drm/Makefile
@@ -3,16 +3,8 @@ include $(TOP)/configs/current
 
 LIBNAME = svgadrm
 
-C_SOURCES = \
-        vmw_buffer.c \
-        vmw_context.c  \
-        vmw_fence.c  \
-        vmw_screen.c  \
-        vmw_screen_dri.c  \
-        vmw_screen_ioctl.c  \
-        vmw_screen_pools.c  \
-        vmw_screen_svga.c  \
-        vmw_surface.c
+# get C_SOURCES
+include Makefile.sources
 
 LIBRARY_INCLUDES = \
        -I$(TOP)/src/gallium/drivers/svga \
diff --git a/src/gallium/winsys/svga/drm/Makefile.sources b/src/gallium/winsys/svga/drm/Makefile.sources
new file mode 100644
index 0000000..c300860
--- /dev/null
+++ b/src/gallium/winsys/svga/drm/Makefile.sources
@@ -0,0 +1,10 @@
+C_SOURCES := \
+        vmw_buffer.c \
+        vmw_context.c  \
+        vmw_fence.c  \
+        vmw_screen.c  \
+        vmw_screen_dri.c  \
+        vmw_screen_ioctl.c  \
+        vmw_screen_pools.c  \
+        vmw_screen_svga.c  \
+        vmw_surface.c
diff --git a/src/gallium/winsys/svga/drm/SConscript b/src/gallium/winsys/svga/drm/SConscript
index 3e25c8a..45775a8 100644
--- a/src/gallium/winsys/svga/drm/SConscript
+++ b/src/gallium/winsys/svga/drm/SConscript
@@ -21,17 +21,7 @@ env.Prepend(CPPPATH = [
 env.Append(CPPDEFINES = [
 ])
 
-sources = [
-    'vmw_buffer.c',
-    'vmw_context.c',
-    'vmw_fence.c',
-    'vmw_screen.c',
-    'vmw_screen_dri.c',
-    'vmw_screen_ioctl.c',
-    'vmw_screen_pools.c',
-    'vmw_screen_svga.c',
-    'vmw_surface.c',
-]
+sources = env.ParseSourceList['Makefile.sources', 'C_SOURCES']
 
 svgadrm = env.ConvenienceLibrary(
     target = 'svgadrm',
-- 
1.7.5.4



More information about the mesa-dev mailing list