Tizen 2.0 Release
[profile/ivi/osmesa.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 # when GLES is enabled, gl* and _glapi_* belong to bridge_glapi and
20 # shared_glapi respectively
21 if env['gles']:
22     env.Prepend(LIBPATH = [shared_glapi.dir])
23     glapi = [bridge_glapi, 'glapi']
24
25 env.Prepend(LIBS = [
26     st_xlib,
27     ws_xlib,
28     glapi,
29     mesa,
30     glsl,
31     gallium,
32 ])
33
34 sources = [
35     'xlib.c',
36 ]
37
38 if True:
39     env.Append(CPPDEFINES = ['GALLIUM_TRACE', 'GALLIUM_RBUG', 'GALLIUM_GALAHAD', 'GALLIUM_SOFTPIPE'])
40     env.Prepend(LIBS = [trace, rbug, galahad, softpipe])
41
42 if env['llvm']:
43     env.Append(CPPDEFINES = ['GALLIUM_LLVMPIPE'])
44     env.Prepend(LIBS = [llvmpipe])
45     
46 if False:
47     # TODO: Detect Cell SDK
48     env.Append(CPPDEFINES = 'GALLIUM_CELL')
49     env.Prepend(LIBS = [cell])
50
51 # TODO: write a wrapper function http://www.scons.org/wiki/WrapperFunctions
52 libgl = env.SharedLibrary(
53     target ='GL',
54     source = sources,
55 )
56
57 if True:
58     # XXX: Only install this libGL.so if DRI not enabled
59     libgl = env.InstallSharedLibrary(libgl, version=(1, 5))
60
61 env.Alias('libgl-xlib', libgl)