Merge remote branch 'origin/7.8'
[mesa.git] / src / gallium / targets / graw-xlib / SConscript
1 #######################################################################
2 # SConscript for xlib winsys
3
4 Import('*')
5
6 if env['platform'] != 'linux':
7 Return()
8
9 if not set(('softpipe', 'llvmpipe', 'cell')).intersection(env['drivers']):
10 print 'warning: no supported pipe driver: skipping build of xlib libGL.so'
11 Return()
12
13 env = env.Clone()
14
15 env.Prepend(LIBS = [
16 ws_xlib,
17 trace,
18 identity,
19 # gallium,
20 ])
21
22 env.Append(CPPPATH = [
23 '#src/gallium/drivers',
24 ])
25
26
27 sources = [
28 'graw_xlib.c',
29 ]
30
31 if 'softpipe' in env['drivers']:
32 env.Append(CPPDEFINES = 'GALLIUM_SOFTPIPE')
33 env.Prepend(LIBS = [softpipe])
34
35 if 'llvmpipe' in env['drivers']:
36 env.Tool('llvm')
37 if 'LLVM_VERSION' in env:
38 env.Append(CPPDEFINES = 'GALLIUM_LLVMPIPE')
39 env.Tool('udis86')
40 env.Prepend(LIBS = [llvmpipe])
41
42 # Need this for trace, identity drivers referenced by
43 # gallium_wrap_screen().
44 #
45 env.Prepend(LIBS = [gallium])
46
47 # TODO: write a wrapper function http://www.scons.org/wiki/WrapperFunctions
48 graw = env.SharedLibrary(
49 target ='graw',
50 source = sources,
51 )
52
53 env.InstallSharedLibrary(graw, version=(1, 0))
54
55 graw = env.FindIxes(graw, 'SHLIBPREFIX', 'SHLIBSUFFIX')
56
57 Export('graw')