rbug: Add to all targets that link against trace
[mesa.git] / src / gallium / targets / libgl-xlib / SConscript
1 #######################################################################
2 # SConscript for xlib winsys
3
4 Import('*')
5
6 if env['platform'] != 'linux':
7 Return()
8
9 if 'mesa' not in env['statetrackers']:
10 print 'warning: Mesa state tracker disabled: skipping build of xlib libGL.so'
11 Return()
12
13 if env['dri']:
14 print 'warning: DRI enabled: skipping build of xlib libGL.so'
15 Return()
16
17 env = env.Clone()
18
19 env.Append(CPPPATH = [
20 '#/src/mapi',
21 '#/src/mesa',
22 '#/src/mesa/main',
23 '#src/gallium/state_trackers/glx/xlib',
24 ])
25
26 env.Append(CPPDEFINES = ['USE_XSHM'])
27
28 env.Prepend(LIBS = [
29 st_xlib,
30 ws_xlib,
31 trace,
32 rbug,
33 identity,
34 glapi,
35 mesa,
36 glsl,
37 gallium,
38 ])
39
40 sources = [
41 'xlib.c',
42 ]
43
44 env.Tool('x11')
45
46 if True:
47 env.Append(CPPDEFINES = 'GALLIUM_SOFTPIPE')
48 env.Prepend(LIBS = [softpipe])
49
50 if env['llvm']:
51 env.Append(CPPDEFINES = 'GALLIUM_LLVMPIPE')
52 env.Tool('udis86')
53 env.Prepend(LIBS = [llvmpipe])
54
55 if 'cell' in env['drivers']:
56 env.Append(CPPDEFINES = 'GALLIUM_CELL')
57 env.Prepend(LIBS = [cell])
58
59 # TODO: write a wrapper function http://www.scons.org/wiki/WrapperFunctions
60 libgl = env.SharedLibrary(
61 target ='GL',
62 source = sources,
63 )
64
65 if not env['dri']:
66 # Only install this libGL.so if DRI not enabled
67 env.InstallSharedLibrary(libgl, version=(1, 5))