glapi: Move to src/mapi/.
[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 identity,
33 glapi,
34 mesa,
35 glsl,
36 gallium,
37 ])
38
39 sources = [
40 'xlib.c',
41 ]
42
43 env.Tool('x11')
44
45 if True:
46 env.Append(CPPDEFINES = 'GALLIUM_SOFTPIPE')
47 env.Prepend(LIBS = [softpipe])
48
49 if env['llvm']:
50 env.Append(CPPDEFINES = 'GALLIUM_LLVMPIPE')
51 env.Tool('udis86')
52 env.Prepend(LIBS = [llvmpipe])
53
54 if 'cell' in env['drivers']:
55 env.Append(CPPDEFINES = 'GALLIUM_CELL')
56 env.Prepend(LIBS = [cell])
57
58 # TODO: write a wrapper function http://www.scons.org/wiki/WrapperFunctions
59 libgl = env.SharedLibrary(
60 target ='GL',
61 source = sources,
62 )
63
64 if not env['dri']:
65 # Only install this libGL.so if DRI not enabled
66 env.InstallSharedLibrary(libgl, version=(1, 5))