Merge commit 'origin/gallium-0.1'
[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 '#src/gallium/state_trackers/glx/xlib',
17 ])
18
19 env.Append(CPPDEFINES = ['USE_XSHM'])
20
21 sources = [
22 'xlib.c',
23 ]
24
25 drivers = []
26
27 if 'softpipe' in env['drivers']:
28 env.Append(CPPDEFINES = 'GALLIUM_SOFTPIPE')
29 sources += ['xlib_softpipe.c']
30 drivers += [softpipe]
31
32 if 'i965simple' in env['drivers']:
33 env.Append(CPPDEFINES = 'GALLIUM_I965SIMPLE')
34 sources += [
35 'xlib_brw_aub.c',
36 'xlib_brw_context.c',
37 'xlib_brw_screen.c',
38 ]
39 drivers += [i965simple]
40
41 if 'cell' in env['drivers']:
42 env.Append(CPPDEFINES = 'GALLIUM_CELL')
43 sources += ['xlib_cell.c']
44 drivers += [cell]
45
46 if 'trace' in env['drivers']:
47 env.Append(CPPDEFINES = 'GALLIUM_TRACE')
48 sources += ['xlib_trace.c']
49 drivers += [trace]
50
51 # TODO: write a wrapper function http://www.scons.org/wiki/WrapperFunctions
52 libgl = env.SharedLibrary(
53 target ='GL',
54 source = sources,
55 LIBS = st_xlib + glapi + mesa + drivers + auxiliaries + env['LIBS'],
56 )
57
58 env.InstallSharedLibrary(libgl, version=(1, 5))