radeonsi: make LLVM IR dumping less messy
[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 Dir('../../../mapi'), # src/mapi build path for python-generated GL API files/headers
14 ])
15
16 env.Append(CPPDEFINES = ['USE_XSHM'])
17
18 env.Prepend(LIBS = env['X11_LIBS'])
19 env.Prepend(LIBPATH = env['X11_LIBPATH'])
20
21 # when GLES is enabled, gl* and _glapi_* belong to bridge_glapi and
22 # shared_glapi respectively
23 if env['gles']:
24 env.Prepend(LIBPATH = [shared_glapi.dir])
25 glapi = [bridge_glapi, 'glapi']
26
27 env.Prepend(LIBS = [
28 st_xlib,
29 ws_xlib,
30 glapi,
31 mesautil,
32 compiler,
33 mesa,
34 glsl,
35 gallium,
36 ])
37
38 sources = [
39 'xlib.c',
40 ]
41
42 if True:
43 env.Append(CPPDEFINES = ['GALLIUM_TRACE', 'GALLIUM_RBUG', 'GALLIUM_SOFTPIPE'])
44 env.Prepend(LIBS = [trace, rbug, softpipe])
45
46 if env['llvm']:
47 env.Append(CPPDEFINES = ['GALLIUM_LLVMPIPE'])
48 env.Prepend(LIBS = [llvmpipe])
49
50 if env['platform'] != 'darwin':
51 env.Append(SHLINKFLAGS = [
52 # Disallow undefined symbols
53 '-Wl,-z,defs',
54 # Restrict exported symbols
55 '-Wl,--version-script=%s' % File("libgl-xlib.sym").srcnode().path,
56 ])
57
58 # libGL.so.1.5
59 libgl_1_5 = env.SharedLibrary(
60 target ='GL',
61 source = sources,
62 SHLIBSUFFIX = env['SHLIBSUFFIX'] + '.1.5',
63 )
64
65 # libGL.so.1
66 libgl = env.subst('${SHLIBPREFIX}GL${SHLIBSUFFIX}')
67 libgl_1 = libgl + '.1'
68 env.Command(libgl_1, libgl_1_5, "ln -sf ${SOURCE.file} ${TARGET}")
69 env.Command(libgl, libgl_1, "ln -sf ${SOURCE.file} ${TARGET}")
70
71 env.Alias('libgl-xlib', libgl)