Merge remote branch 'origin/7.8'
[mesa.git] / src / gallium / drivers / sw / SConscript
1 #######################################################################
2 # SConscript for swrast convenience library
3 #
4 # This is a meta-driver which consists of any and all of the software
5 # rasterizers into a single driver. A software rasterizer is defined
6 # as any driver which takes an sw_winsys pointer as the only argument
7 # to create_screen.
8 #
9 # XXX: unfortunately users of this driver still need to link in any
10 # extra libraries needed for the particular driver (eg llvm for
11 # llvmpipe). Not sure how to get around this.
12
13 Import('*')
14
15 if not set(('softpipe', 'llvmpipe', 'cell')).intersection(env['drivers']):
16 print 'warning: no supported pipe driver: skipping build of sw meta-driver'
17 Return()
18
19 env = env.Clone()
20
21 if 'softpipe' in env['drivers']:
22 env.Append(CPPDEFINES = 'GALLIUM_SOFTPIPE')
23 env.Prepend(LIBS = [softpipe])
24
25 if 'llvmpipe' in env['drivers']:
26 env.Tool('llvm')
27 if 'LLVM_VERSION' in env:
28 env.Append(CPPDEFINES = 'GALLIUM_LLVMPIPE')
29 env.Tool('udis86')
30 env.Prepend(LIBS = [llvmpipe])
31
32 if 'cell' in env['drivers']:
33 env.Append(CPPDEFINES = 'GALLIUM_CELL')
34 env.Prepend(LIBS = [cell])
35
36 sw = env.ConvenienceLibrary(
37 target = 'sw',
38 source = [
39 'sw.c',
40 ]
41 )
42 Export('sw')