scons: Revamp how to specify targets to build.
[mesa.git] / src / gallium / targets / libgl-xlib / SConscript
1 #######################################################################
2 # SConscript for xlib winsys
3
4 Import('*')
5
6 env = env.Clone()
7
8 env.Append(CPPPATH = [
9 '#/src/mapi',
10 '#/src/mesa',
11 '#/src/mesa/main',
12 '#src/gallium/state_trackers/glx/xlib',
13 ])
14
15 env.Append(CPPDEFINES = ['USE_XSHM'])
16
17 env.Prepend(LIBS = env['X11_LIBS'])
18
19 env.Prepend(LIBS = [
20 st_xlib,
21 ws_xlib,
22 trace,
23 rbug,
24 identity,
25 glapi,
26 mesa,
27 glsl,
28 gallium,
29 'talloc'
30 ])
31
32 sources = [
33 'xlib.c',
34 ]
35
36 if True:
37 env.Append(CPPDEFINES = 'GALLIUM_SOFTPIPE')
38 env.Prepend(LIBS = [softpipe])
39
40 if True:
41 env.Append(CPPDEFINES = 'GALLIUM_GALAHAD')
42 env.Prepend(LIBS = [galahad])
43
44 if env['llvm']:
45 env.Append(CPPDEFINES = 'GALLIUM_LLVMPIPE')
46 env.Prepend(LIBS = [llvmpipe])
47
48 if False:
49 # TODO: Detect Cell SDK
50 env.Append(CPPDEFINES = 'GALLIUM_CELL')
51 env.Prepend(LIBS = [cell])
52
53 # TODO: write a wrapper function http://www.scons.org/wiki/WrapperFunctions
54 libgl = env.SharedLibrary(
55 target ='GL',
56 source = sources,
57 )
58
59 if True:
60 # XXX: Only install this libGL.so if DRI not enabled
61 libgl = env.InstallSharedLibrary(libgl, version=(1, 5))
62
63 env.Alias('libgl-xlib', libgl)