Merge remote branch 'origin/master' into nv50-compiler
[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 'talloc'
39 ])
40
41 sources = [
42 'xlib.c',
43 ]
44
45 env.Tool('x11')
46
47 if True:
48 env.Append(CPPDEFINES = 'GALLIUM_SOFTPIPE')
49 env.Prepend(LIBS = [softpipe])
50
51 if env['llvm']:
52 env.Append(CPPDEFINES = 'GALLIUM_LLVMPIPE')
53 env.Tool('udis86')
54 env.Prepend(LIBS = [llvmpipe])
55
56 if 'cell' in env['drivers']:
57 env.Append(CPPDEFINES = 'GALLIUM_CELL')
58 env.Prepend(LIBS = [cell])
59
60 # TODO: write a wrapper function http://www.scons.org/wiki/WrapperFunctions
61 libgl = env.SharedLibrary(
62 target ='GL',
63 source = sources,
64 )
65
66 if not env['dri']:
67 # Only install this libGL.so if DRI not enabled
68 env.InstallSharedLibrary(libgl, version=(1, 5))