summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/sw/SConscript
diff options
context:
space:
mode:
authorKeith Whitwell <[email protected]>2010-03-28 09:53:58 -0700
committerKeith Whitwell <[email protected]>2010-03-28 10:42:38 -0700
commitdb5c2235d1accc2adcf1746aec2342bfa67237ba (patch)
tree1dcfbcda4288341b53f51c9f88c8ac2fae978f3a /src/gallium/drivers/sw/SConscript
parentf97f46f269666b289f9af977e238ccda9b483c44 (diff)
gallium: new raw gallium interface to support standalone tests
Provides basic window system integration behind a simple interface, allowing tests to be written without dependency on either the driver or window system. With a lot of work, could turn into something like glut for gallium.
Diffstat (limited to 'src/gallium/drivers/sw/SConscript')
-rw-r--r--src/gallium/drivers/sw/SConscript42
1 files changed, 42 insertions, 0 deletions
diff --git a/src/gallium/drivers/sw/SConscript b/src/gallium/drivers/sw/SConscript
new file mode 100644
index 00000000000..6fbbdf3cc46
--- /dev/null
+++ b/src/gallium/drivers/sw/SConscript
@@ -0,0 +1,42 @@
+#######################################################################
+# SConscript for swrast convenience library
+#
+# This is a meta-driver which consists of any and all of the software
+# rasterizers into a single driver. A software rasterizer is defined
+# as any driver which takes an sw_winsys pointer as the only argument
+# to create_screen.
+#
+# XXX: unfortunately users of this driver still need to link in any
+# extra libraries needed for the particular driver (eg llvm for
+# llvmpipe). Not sure how to get around this.
+
+Import('*')
+
+if not set(('softpipe', 'llvmpipe', 'cell')).intersection(env['drivers']):
+ print 'warning: no supported pipe driver: skipping build of sw meta-driver'
+ Return()
+
+env = env.Clone()
+
+if 'softpipe' in env['drivers']:
+ env.Append(CPPDEFINES = 'GALLIUM_SOFTPIPE')
+ env.Prepend(LIBS = [softpipe])
+
+if 'llvmpipe' in env['drivers']:
+ env.Tool('llvm')
+ if 'LLVM_VERSION' in env:
+ env.Append(CPPDEFINES = 'GALLIUM_LLVMPIPE')
+ env.Tool('udis86')
+ env.Prepend(LIBS = [llvmpipe])
+
+if 'cell' in env['drivers']:
+ env.Append(CPPDEFINES = 'GALLIUM_CELL')
+ env.Prepend(LIBS = [cell])
+
+sw = env.ConvenienceLibrary(
+ target = 'sw',
+ source = [
+ 'sw.c',
+ ]
+ )
+ Export('sw')