scons: Fixups for the introduction of the xlib state_tracker.
[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 ('softpipe' or 'i915simple' or 'trace') in 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 ])
17
18 sources = [];
19
20 drivers = [];
21
22 if 'softpipe' in env['drivers']:
23 drivers += [softpipe]
24
25 if 'i965simple' in env['drivers']:
26 drivers += [i965simple]
27 sources += [
28 'brw_aub.c',
29 'xm_winsys_aub.c',
30 ]
31
32 if 'trace' in env['drivers']:
33 env.Append(CPPDEFINES = 'GALLIUM_TRACE')
34 drivers += [trace]
35
36 # TODO: write a wrapper function http://www.scons.org/wiki/WrapperFunctions
37 libgl = env.SharedLibrary(
38 target ='GL',
39 source = sources,
40 LIBS = st_xlib + glapi + mesa + drivers + auxiliaries + env['LIBS'],
41 )
42
43 env.InstallSharedLibrary(libgl, version=(1, 5))