3aef3b6cedddb2e73026fbfeee387553a2a93c07
[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 'glxapi.c',
20 'fakeglx.c',
21 'xfonts.c',
22 'xm_api.c',
23 'xm_winsys.c',
24 ]
25
26 drivers = [];
27
28 if 'softpipe' in env['drivers']:
29 drivers += [softpipe]
30
31 if 'i965simple' in env['drivers']:
32 drivers += [i965simple]
33 sources += [
34 'brw_aub.c',
35 'xm_winsys_aub.c',
36 ]
37
38 if 'trace' in env['drivers']:
39 env.Append(CPPDEFINES = 'GALLIUM_TRACE')
40 drivers += [trace]
41
42 # TODO: write a wrapper function http://www.scons.org/wiki/WrapperFunctions
43 libgl = env.SharedLibrary(
44 target ='GL',
45 source = sources,
46 LIBS = glapi + mesa + drivers + auxiliaries + env['LIBS'],
47 )
48
49 env.InstallSharedLibrary(libgl, version=(1, 5))