xlib: Integrate the trace driver with all pipe drivers.
[mesa.git] / src / gallium / winsys / xlib / SConscript
1 #######################################################################
2 # SConscript for xlib winsys
3
4 Import('*')
5
6 if env['platform'] == 'linux' \
7 and 'mesa' in env['statetrackers'] \
8 and set(('softpipe', 'llvmpipe', 'i915', 'trace')).intersection(env['drivers']) \
9 and not env['dri']:
10
11 env = env.Clone()
12
13 env.Append(CPPPATH = [
14 '#/src/mesa',
15 '#/src/mesa/main',
16 '#src/gallium/state_trackers/glx/xlib',
17 ])
18
19 env.Append(CPPDEFINES = ['USE_XSHM'])
20
21 sources = [
22 'xlib.c',
23 ]
24
25 drivers = [trace]
26
27 if 'softpipe' in env['drivers']:
28 env.Append(CPPDEFINES = 'GALLIUM_SOFTPIPE')
29 sources += ['xlib_softpipe.c']
30 drivers += [softpipe]
31
32 if 'llvmpipe' in env['drivers']:
33 env.Tool('llvm')
34 if 'LLVM_VERSION' in env:
35 env.Append(CPPDEFINES = 'GALLIUM_LLVMPIPE')
36 env.Tool('udis86')
37 sources += ['xlib_llvmpipe.c']
38 drivers += [llvmpipe]
39
40 if 'cell' in env['drivers']:
41 env.Append(CPPDEFINES = 'GALLIUM_CELL')
42 sources += ['xlib_cell.c']
43 drivers += [cell]
44
45 # TODO: write a wrapper function http://www.scons.org/wiki/WrapperFunctions
46 libgl = env.SharedLibrary(
47 target ='GL',
48 source = sources,
49 LIBS = st_xlib + glapi + mesa + glsl + drivers + auxiliaries + env['LIBS'],
50 )
51
52 env.InstallSharedLibrary(libgl, version=(1, 5))