swrastg: Use llvmpipe if built but only on scons
[mesa.git] / src / gallium / targets / dri-swrast / SConscript
1 Import('*')
2
3 if not set(('softpipe', 'llvmpipe')).intersection(env['drivers']):
4 print 'warning: no supported pipe driver: skipping build of swrastg_dri.so'
5 Return()
6
7 env = drienv.Clone()
8
9 env.Append(CPPPATH = [
10 '#/src/gallium/winsys/sw/dri',
11 ])
12
13 env.Prepend(LIBS = [
14 st_drisw,
15 ws_dri,
16 trace,
17 mesa,
18 glsl,
19 gallium,
20 COMMON_DRI_SW_OBJECTS
21 ])
22
23 if 'softpipe' in env['drivers']:
24 env.Append(CPPDEFINES = 'GALLIUM_SOFTPIPE')
25 env.Prepend(LIBS = [softpipe])
26
27 if 'llvmpipe' in env['drivers']:
28 env.Tool('llvm')
29 if 'LLVM_VERSION' in env:
30 env.Append(CPPDEFINES = 'GALLIUM_LLVMPIPE')
31 env.Tool('udis86')
32 env.Prepend(LIBS = [llvmpipe])
33
34 swrastg_sources = [
35 'swrast_drm_api.c'
36 ]
37
38 env.LoadableModule(
39 target ='swrastg_dri.so',
40 source = swrastg_sources,
41 SHLIBPREFIX = '',
42 )