nouveau: share the source lists
authorChia-I Wu <olv@lunarg.com>
Mon, 22 Aug 2011 03:30:27 +0000 (11:30 +0800)
committerChia-I Wu <olvaffe@gmail.com>
Sat, 27 Aug 2011 09:28:31 +0000 (17:28 +0800)
For each driver, factor out C_SOURCES from Makefile to Makefile.sources,
and let Makefile and SConscript share it.

12 files changed:
src/gallium/drivers/nouveau/Makefile
src/gallium/drivers/nouveau/Makefile.sources [new file with mode: 0644]
src/gallium/drivers/nouveau/SConscript
src/gallium/drivers/nv50/Makefile
src/gallium/drivers/nv50/Makefile.sources [new file with mode: 0644]
src/gallium/drivers/nv50/SConscript
src/gallium/drivers/nvc0/Makefile
src/gallium/drivers/nvc0/Makefile.sources [new file with mode: 0644]
src/gallium/drivers/nvc0/SConscript
src/gallium/drivers/nvfx/Makefile
src/gallium/drivers/nvfx/Makefile.sources [new file with mode: 0644]
src/gallium/drivers/nvfx/SConscript

index aae6d9889bb0ff5ada89374f7053a4b1017856da..eb35c1f1d4e20c37024ea1e90e4b9ea15d712365 100644 (file)
@@ -7,10 +7,7 @@ LIBRARY_INCLUDES = \
        $(LIBDRM_CFLAGS) \
        -I$(TOP)/src/gallium/drivers/nouveau/include
 
-C_SOURCES = nouveau_screen.c \
-            nouveau_fence.c \
-            nouveau_mm.c \
-            nouveau_buffer.c \
-            nouveau_video.c
+# get C_SOURCES
+include Makefile.sources
 
 include ../../Makefile.template
diff --git a/src/gallium/drivers/nouveau/Makefile.sources b/src/gallium/drivers/nouveau/Makefile.sources
new file mode 100644 (file)
index 0000000..5a5998b
--- /dev/null
@@ -0,0 +1,6 @@
+C_SOURCES := \
+       nouveau_screen.c \
+       nouveau_fence.c \
+       nouveau_mm.c \
+       nouveau_buffer.c \
+       nouveau_video.c
index fe7af4d2ae8cc305b5a1bf0818b2ff7819507917..8cbed556e2224bb6812c790b8104bb2d56ca7542 100644 (file)
@@ -4,8 +4,7 @@ env = env.Clone()
 
 nouveau = env.ConvenienceLibrary(
     target = 'nouveau',
-    source = [
-        'nouveau_screen.c',
-    ])
+    source = env.ParserSourceList('Makefile.sources', 'C_SOURCES')
+    )
 
 Export('nouveau')
index 02bcc26cfb38b82cd09a7eb1ebf7f0ca98791018..220adf696b382f7e560752d5d4fd8410fd3c002d 100644 (file)
@@ -3,29 +3,8 @@ include $(TOP)/configs/current
 
 LIBNAME = nv50
 
-C_SOURCES = \
-       nv50_context.c \
-       nv50_draw.c \
-       nv50_formats.c \
-       nv50_miptree.c \
-       nv50_resource.c \
-       nv50_screen.c \
-       nv50_state.c \
-       nv50_state_validate.c \
-       nv50_surface.c \
-       nv50_tex.c \
-       nv50_transfer.c \
-       nv50_vbo.c \
-       nv50_program.c \
-       nv50_shader_state.c \
-       nv50_pc.c \
-       nv50_pc_print.c \
-       nv50_pc_emit.c \
-       nv50_tgsi_to_nc.c \
-       nv50_pc_optimize.c \
-       nv50_pc_regalloc.c \
-       nv50_push.c \
-       nv50_query.c
+# get C_SOURCES
+include Makefile.sources
 
 LIBRARY_INCLUDES = \
        $(LIBDRM_CFLAGS)
diff --git a/src/gallium/drivers/nv50/Makefile.sources b/src/gallium/drivers/nv50/Makefile.sources
new file mode 100644 (file)
index 0000000..756f90b
--- /dev/null
@@ -0,0 +1,23 @@
+C_SOURCES := \
+       nv50_context.c \
+       nv50_draw.c \
+       nv50_formats.c \
+       nv50_miptree.c \
+       nv50_resource.c \
+       nv50_screen.c \
+       nv50_state.c \
+       nv50_state_validate.c \
+       nv50_surface.c \
+       nv50_tex.c \
+       nv50_transfer.c \
+       nv50_vbo.c \
+       nv50_program.c \
+       nv50_shader_state.c \
+       nv50_pc.c \
+       nv50_pc_print.c \
+       nv50_pc_emit.c \
+       nv50_tgsi_to_nc.c \
+       nv50_pc_optimize.c \
+       nv50_pc_regalloc.c \
+       nv50_push.c \
+       nv50_query.c
index 3c8a7276b9723c1244f02eb351677bb0d64cdb80..e0484c5708660d0065d971cfd8e2be741539beb6 100644 (file)
@@ -4,29 +4,7 @@ env = env.Clone()
 
 nv50 = env.ConvenienceLibrary(
     target = 'nv50',
-    source = [
-        'nv50_context.c',
-        'nv50_draw.c',
-        'nv50_formats.c',
-        'nv50_miptree.c',
-        'nv50_resource.c',
-        'nv50_screen.c',
-        'nv50_state.c',
-        'nv50_state_validate.c',
-        'nv50_surface.c',
-        'nv50_tex.c',
-        'nv50_transfer.c',
-        'nv50_vbo.c',
-        'nv50_program.c',
-        'nv50_shader_state.c',
-        'nv50_pc.c',
-        'nv50_pc_print.c',
-        'nv50_pc_emit.c',
-        'nv50_tgsi_to_nc.c',
-        'nv50_pc_optimize.c',
-        'nv50_pc_regalloc.c',
-        'nv50_push.c',
-        'nv50_query.c'
-    ])
+    source = env.ParserSourceList('Makefile.sources', 'C_SOURCES')
+    )
 
 Export('nv50')
index e1cd188eec5ef58139c95f8d5a0db9cb7c735b94..3a5314625e618d8346c8657a179421886c35b352 100644 (file)
@@ -3,30 +3,8 @@ include $(TOP)/configs/current
 
 LIBNAME = nvc0
 
-C_SOURCES = \
-       nvc0_context.c \
-       nvc0_draw.c \
-       nvc0_formats.c \
-       nvc0_miptree.c \
-       nvc0_resource.c \
-       nvc0_screen.c \
-       nvc0_state.c \
-       nvc0_state_validate.c \
-       nvc0_surface.c \
-       nvc0_tex.c \
-       nvc0_transfer.c \
-       nvc0_vbo.c \
-       nvc0_program.c \
-       nvc0_shader_state.c \
-       nvc0_pc.c \
-       nvc0_pc_print.c \
-       nvc0_pc_emit.c \
-       nvc0_tgsi_to_nc.c \
-       nvc0_pc_optimize.c \
-       nvc0_pc_regalloc.c \
-       nvc0_push.c \
-       nvc0_push2.c \
-       nvc0_query.c
+# get C_SOURCES
+include Makefile.sources
 
 LIBRARY_INCLUDES = \
        $(LIBDRM_CFLAGS)
diff --git a/src/gallium/drivers/nvc0/Makefile.sources b/src/gallium/drivers/nvc0/Makefile.sources
new file mode 100644 (file)
index 0000000..a057f06
--- /dev/null
@@ -0,0 +1,24 @@
+C_SOURCES := \
+       nvc0_context.c \
+       nvc0_draw.c \
+       nvc0_formats.c \
+       nvc0_miptree.c \
+       nvc0_resource.c \
+       nvc0_screen.c \
+       nvc0_state.c \
+       nvc0_state_validate.c \
+       nvc0_surface.c \
+       nvc0_tex.c \
+       nvc0_transfer.c \
+       nvc0_vbo.c \
+       nvc0_program.c \
+       nvc0_shader_state.c \
+       nvc0_pc.c \
+       nvc0_pc_print.c \
+       nvc0_pc_emit.c \
+       nvc0_tgsi_to_nc.c \
+       nvc0_pc_optimize.c \
+       nvc0_pc_regalloc.c \
+       nvc0_push.c \
+       nvc0_push2.c \
+       nvc0_query.c
index dbbbf663b33a6aefc3ca554d71c2248331f78483..eb32373b71d7b44c8968be4cb1f3cd72b82dfb29 100644 (file)
@@ -4,30 +4,7 @@ env = env.Clone()
 
 nvc0 = env.ConvenienceLibrary(
     target = 'nvc0',
-    source = [
-        'nvc0_context.c',
-        'nvc0_draw.c',
-        'nvc0_formats.c',
-        'nvc0_miptree.c',
-        'nvc0_resource.c',
-        'nvc0_screen.c',
-        'nvc0_state.c',
-        'nvc0_state_validate.c',
-        'nvc0_surface.c',
-        'nvc0_tex.c',
-        'nvc0_transfer.c',
-        'nvc0_vbo.c',
-        'nvc0_program.c',
-        'nvc0_shader_state.c',
-        'nvc0_pc.c',
-        'nvc0_pc_print.c',
-        'nvc0_pc_emit.c',
-        'nvc0_tgsi_to_nc.c',
-        'nvc0_pc_optimize.c',
-        'nvc0_pc_regalloc.c',
-        'nvc0_push.c',
-        'nvc0_push2.c',
-        'nvc0_query.c'
-    ])
+    source = env.ParserSourceList('Makefile.sources', 'C_SOURCES')
+    )
 
 Export('nvc0')
index a3b76ac61b101e39860e1854f1bbabe2f531dfbd..53292d6da12e6cd1ceb827f578426ea518244b55 100644 (file)
@@ -3,28 +3,8 @@ include $(TOP)/configs/current
 
 LIBNAME = nvfx
 
-C_SOURCES = \
-       nv04_2d.c \
-       nvfx_buffer.c \
-       nvfx_context.c \
-       nvfx_clear.c \
-       nvfx_draw.c \
-       nvfx_fragprog.c \
-       nvfx_fragtex.c \
-       nv30_fragtex.c \
-       nv40_fragtex.c \
-       nvfx_miptree.c \
-       nvfx_push.c \
-       nvfx_query.c \
-       nvfx_resource.c \
-       nvfx_screen.c \
-       nvfx_state.c \
-       nvfx_state_emit.c \
-       nvfx_state_fb.c \
-       nvfx_surface.c \
-       nvfx_transfer.c \
-       nvfx_vbo.c \
-       nvfx_vertprog.c
+# get C_SOURCES
+include Makefile.sources
 
 LIBRARY_INCLUDES = \
        $(LIBDRM_CFLAGS) \
diff --git a/src/gallium/drivers/nvfx/Makefile.sources b/src/gallium/drivers/nvfx/Makefile.sources
new file mode 100644 (file)
index 0000000..31611f7
--- /dev/null
@@ -0,0 +1,22 @@
+C_SOURCES := \
+       nv04_2d.c \
+       nvfx_buffer.c \
+       nvfx_context.c \
+       nvfx_clear.c \
+       nvfx_draw.c \
+       nvfx_fragprog.c \
+       nvfx_fragtex.c \
+       nv30_fragtex.c \
+       nv40_fragtex.c \
+       nvfx_miptree.c \
+       nvfx_push.c \
+       nvfx_query.c \
+       nvfx_resource.c \
+       nvfx_screen.c \
+       nvfx_state.c \
+       nvfx_state_emit.c \
+       nvfx_state_fb.c \
+       nvfx_surface.c \
+       nvfx_transfer.c \
+       nvfx_vbo.c \
+       nvfx_vertprog.c
index f1041e7763345b7bd9519331587f39f973b691a6..4f57662d5e144b48170a620b2f9dac8c6c1e99f5 100644 (file)
@@ -8,28 +8,7 @@ env.PrependUnique(delete_existing=1, CPPPATH = [
 
 nvfx = env.ConvenienceLibrary(
     target = 'nvfx',
-    source = [
-        'nv04_2d.c',
-        'nvfx_buffer.c',
-        'nvfx_context.c',
-        'nvfx_clear.c',
-        'nvfx_draw.c',
-        'nvfx_fragprog.c',
-        'nvfx_fragtex.c',
-        'nv30_fragtex.c',
-        'nv40_fragtex.c',
-        'nvfx_miptree.c',
-        'nvfx_push.c',
-        'nvfx_query.c',
-        'nvfx_resource.c',
-        'nvfx_screen.c',
-        'nvfx_state.c',
-        'nvfx_state_emit.c',
-        'nvfx_state_fb.c',
-        'nvfx_surface.c',
-        'nvfx_transfer.c',
-        'nvfx_vbo.c',
-        'nvfx_vertprog.c',
-    ])
+    source = env.ParserSourceList('Makefile.sources', 'C_SOURCES')
+    )
 
 Export('nvfx')