Make r300 and amd build in scons.
authorCorbin Simpson <MostAwesomeDude@gmail.com>
Sat, 10 Jan 2009 05:28:23 +0000 (21:28 -0800)
committerCorbin Simpson <MostAwesomeDude@gmail.com>
Mon, 2 Feb 2009 07:30:21 +0000 (23:30 -0800)
SConstruct
src/gallium/drivers/r300/SConscript [new file with mode: 0644]
src/gallium/drivers/r300/r300_blit.h
src/gallium/winsys/drm/amd/SConscript [new file with mode: 0644]

index 88cdffa5048f747a970bdc3fd6ae394eae41bcb0..a22b9483da04dd9c649d17e0f31ef70646144484 100644 (file)
@@ -46,9 +46,9 @@ common.AddOptions(opts)
 opts.Add(ListOption('statetrackers', 'state trackers to build', default_statetrackers,
                      ['mesa', 'python']))
 opts.Add(ListOption('drivers', 'pipe drivers to build', default_drivers,
-                     ['softpipe', 'failover', 'i915simple', 'i965simple', 'cell', 'trace']))
+                     ['softpipe', 'failover', 'i915simple', 'i965simple', 'cell', 'trace', 'r300']))
 opts.Add(ListOption('winsys', 'winsys drivers to build', default_winsys,
-                     ['xlib', 'intel', 'gdi'])) 
+                     ['xlib', 'intel', 'gdi', 'amd']))
 
 opts.Add(EnumOption('MSVS_VERSION', 'MS Visual C++ version', None, allowed_values=('7.1', '8.0', '9.0')))
 
diff --git a/src/gallium/drivers/r300/SConscript b/src/gallium/drivers/r300/SConscript
new file mode 100644 (file)
index 0000000..18684c3
--- /dev/null
@@ -0,0 +1,17 @@
+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',
+       ])
+
+Export('r300')
+
index 09cb566b95b3f7d75ac30dc963948f54cd4d91a3..740cbcdea5c032555bb4a2e143f652a1825586f0 100644 (file)
@@ -25,6 +25,7 @@
 
 #include "pipe/p_state.h"
 
+#include "r300_context.h"
 #include "r300_cs.h"
 
 /* Forward declarations. */
diff --git a/src/gallium/winsys/drm/amd/SConscript b/src/gallium/winsys/drm/amd/SConscript
new file mode 100644 (file)
index 0000000..a4856da
--- /dev/null
@@ -0,0 +1,29 @@
+Import('*')
+
+if 'mesa' in env['statetrackers']:
+
+       env = drienv.Clone()
+
+       DRIVER_SOURCES = [
+               'amd_buffer.c',
+               'amd_context.c',
+               'amd_screen.c',
+               'amd_winsys_softpipe.c',
+       ]
+
+       sources = \
+               COMMON_GALLIUM_SOURCES + \
+               DRIVER_SOURCES
+
+       drivers = [
+               softpipe,
+               r300
+       ]
+
+       # TODO: write a wrapper function http://www.scons.org/wiki/WrapperFunctions
+       env.SharedLibrary(
+               target ='amd_dri.so',
+               source = sources,
+               LIBS = drivers + mesa + auxiliaries + env['LIBS'],
+       )
+