Add scons build support for radeon/r300.
authorCorbin Simpson <MostAwesomeDude@gmail.com>
Sat, 4 Apr 2009 07:34:10 +0000 (00:34 -0700)
committerCorbin Simpson <MostAwesomeDude@gmail.com>
Sat, 4 Apr 2009 07:36:05 +0000 (00:36 -0700)
SConstruct
src/gallium/drivers/r300/SConscript
src/gallium/winsys/drm/SConscript
src/gallium/winsys/drm/radeon/SConscript
src/gallium/winsys/drm/radeon/core/SConscript [new file with mode: 0644]
src/gallium/winsys/drm/radeon/dri2/SConscript [new file with mode: 0644]

index 7e7f51516e8453c1903fe0b37a4919491ffb745b..1e5fd71adcebb588462f520910d90bc983b6ac4d 100644 (file)
@@ -48,7 +48,7 @@ opts.Add(ListOption('statetrackers', 'state trackers to build', default_statetra
 opts.Add(ListOption('drivers', 'pipe drivers to build', default_drivers,
                      ['softpipe', 'failover', 'i915simple', 'i965simple', 'cell', 'trace', 'r300']))
 opts.Add(ListOption('winsys', 'winsys drivers to build', default_winsys,
-                     ['xlib', 'intel', 'gdi', 'amd']))
+                     ['xlib', 'intel', 'gdi', 'radeon']))
 
 opts.Add(EnumOption('MSVS_VERSION', 'MS Visual C++ version', None, allowed_values=('7.1', '8.0', '9.0')))
 
index 18684c3e7f97063cdf17c4463b11e494a93f2bda..c914bc7c40aa46440f0691027d5dc2c2817f9d7b 100644 (file)
@@ -3,15 +3,25 @@ Import('*')
 env = env.Clone()
 
 r300 = env.ConvenienceLibrary(
-       target = 'r300',
-       source = [
-               'r300_blit.c',
-               'r300_clear.c',
-               'r300_context.c',
-               'r300_screen.c',
-               'r300_state.c',
-               'r300_surface.c',
-       ])
+    target = 'r300',
+    source = [
+        'r300_chipset.c',
+        'r300_clear.c',
+        'r300_context.c',
+        'r300_debug.c',
+        'r300_emit.c',
+        'r300_flush.c',
+        'r300_query.c',
+        'r300_screen.c',
+        'r300_state.c',
+        'r300_state_derived.c',
+        'r300_state_invariant.c',
+        'r300_state_shader.c',
+        'r300_state_tcl.c',
+        'r300_surface.c',
+        'r300_swtcl_emit.c',
+        'r300_texture.c',
+    ])
 
 Export('r300')
 
index aef5210a32da5777979a93751752637eea603af2..a9e9f2682a7eb36ffac1a5b3222e3ef8bb2fe44f 100644 (file)
@@ -52,3 +52,8 @@ if env['dri']:
                SConscript([
                        'intel/SConscript',
                ])
+
+       if 'radeon' in env['winsys']:
+               SConscript([
+                       'radeon/SConscript',
+               ])
index 2435211a327510b715002b3cc789d54170631ad2..8f99055b2f70eceee069b966c7d8a4c876efbe7c 100644 (file)
@@ -1,29 +1,7 @@
 Import('*')
 
-if 'mesa' in env['statetrackers']:
-
-       env = drienv.Clone()
-
-       DRIVER_SOURCES = [
-               'radeon_buffer.c',
-               'radeon_context.c',
-               'radeon_screen.c',
-               'radeon_winsys_softpipe.c',
-       ]
+SConscript(['core/SConscript',])
 
-       sources = \
-               COMMON_GALLIUM_SOURCES + \
-               DRIVER_SOURCES
-
-       drivers = [
-               softpipe,
-               r300
-       ]
-
-       # TODO: write a wrapper function http://www.scons.org/wiki/WrapperFunctions
-       env.SharedLibrary(
-               target ='radeon_dri.so',
-               source = sources,
-               LIBS = drivers + mesa + auxiliaries + env['LIBS'],
-       )
+if 'mesa' in env['statetrackers']:
 
+    SConscript(['dri2/SConscript'])
diff --git a/src/gallium/winsys/drm/radeon/core/SConscript b/src/gallium/winsys/drm/radeon/core/SConscript
new file mode 100644 (file)
index 0000000..578174e
--- /dev/null
@@ -0,0 +1,17 @@
+Import('*')
+
+env = drienv.Clone()
+
+radeon_sources = [
+    'radeon_buffer.c',
+    'radeon_drm.c',
+    'radeon_r300.c',
+    'radeon_winsys_softpipe.c',
+]
+
+env.Append(CPPPATH = '#/src/gallium/drivers/r300')
+
+env.ConvenienceLibrary(
+    target ='radeonwinsys',
+    source = radeon_sources,
+)
diff --git a/src/gallium/winsys/drm/radeon/dri2/SConscript b/src/gallium/winsys/drm/radeon/dri2/SConscript
new file mode 100644 (file)
index 0000000..f2cdee9
--- /dev/null
@@ -0,0 +1,14 @@
+Import('*')
+
+env = drienv.Clone()
+
+drivers = [
+    softpipe,
+    r300
+]
+
+env.SharedLibrary(
+    target ='radeon_dri.so',
+    source = COMMON_GALLIUM_SOURCES,
+    LIBS = drivers + mesa + auxiliaries + env['LIBS'],
+)