Merge branch 'mesa_7_5_branch' into mesa_7_6_branch
[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', 'i915simple', '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 = []
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 'i965simple' in env['drivers']:
41 env.Append(CPPDEFINES = 'GALLIUM_I965SIMPLE')
42 sources += [
43 'xlib_brw_aub.c',
44 'xlib_brw_context.c',
45 'xlib_brw_screen.c',
46 ]
47 drivers += [i965simple]
48
49 if 'cell' in env['drivers']:
50 env.Append(CPPDEFINES = 'GALLIUM_CELL')
51 sources += ['xlib_cell.c']
52 drivers += [cell]
53
54 if 'trace' in env['drivers']:
55 env.Append(CPPDEFINES = 'GALLIUM_TRACE')
56 sources += ['xlib_trace.c']
57 drivers += [trace]
58
59 # TODO: write a wrapper function http://www.scons.org/wiki/WrapperFunctions
60 libgl = env.SharedLibrary(
61 target ='GL',
62 source = sources,
63 LIBS = st_xlib + glapi + mesa + drivers + auxiliaries + env['LIBS'],
64 )
65
66 env.InstallSharedLibrary(libgl, version=(1, 5))