27b562e1d5d6ffae7d8362675066a83e28d02382
[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 True:
52 env.Append(CPPDEFINES = 'GALLIUM_GALAHAD')
53 env.Prepend(LIBS = [galahad])
54
55 if env['llvm']:
56 env.Append(CPPDEFINES = 'GALLIUM_LLVMPIPE')
57 env.Tool('udis86')
58 env.Prepend(LIBS = [llvmpipe])
59
60 if 'cell' in env['drivers']:
61 env.Append(CPPDEFINES = 'GALLIUM_CELL')
62 env.Prepend(LIBS = [cell])
63
64 # TODO: write a wrapper function http://www.scons.org/wiki/WrapperFunctions
65 libgl = env.SharedLibrary(
66 target ='GL',
67 source = sources,
68 )
69
70 if not env['dri']:
71 # Only install this libGL.so if DRI not enabled
72 env.InstallSharedLibrary(libgl, version=(1, 5))