Merge remote branch 'origin/7.8'
[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/mesa',
21 '#/src/mesa/main',
22 '#src/gallium/state_trackers/glx/xlib',
23 ])
24
25 env.Append(CPPDEFINES = ['USE_XSHM'])
26
27 env.Prepend(LIBS = [
28 st_xlib,
29 ws_xlib,
30 trace,
31 identity,
32 glapi,
33 mesa,
34 glsl,
35 gallium,
36 ])
37
38 sources = [
39 'xlib.c',
40 ]
41
42 env.Tool('x11')
43
44 if True:
45 env.Append(CPPDEFINES = 'GALLIUM_SOFTPIPE')
46 env.Prepend(LIBS = [softpipe])
47
48 if env['llvm']:
49 env.Append(CPPDEFINES = 'GALLIUM_LLVMPIPE')
50 env.Tool('udis86')
51 env.Prepend(LIBS = [llvmpipe])
52
53 if 'cell' in env['drivers']:
54 env.Append(CPPDEFINES = 'GALLIUM_CELL')
55 env.Prepend(LIBS = [cell])
56
57 # TODO: write a wrapper function http://www.scons.org/wiki/WrapperFunctions
58 libgl = env.SharedLibrary(
59 target ='GL',
60 source = sources,
61 )
62
63 if not env['dri']:
64 # Only install this libGL.so if DRI not enabled
65 env.InstallSharedLibrary(libgl, version=(1, 5))