v3d: Fix stencil sampling from a separate-stencil buffer.
[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 env.Prepend(LIBS = [
22 st_xlib,
23 ws_xlib,
24 glapi,
25 mesautil,
26 compiler,
27 mesa,
28 glsl,
29 nir,
30 spirv,
31 gallium,
32 ])
33
34 sources = [
35 'xlib.c',
36 ]
37
38 if True:
39 env.Append(CPPDEFINES = ['GALLIUM_SOFTPIPE'])
40 env.Prepend(LIBS = [softpipe])
41
42 if env['llvm']:
43 env.Append(CPPDEFINES = ['GALLIUM_LLVMPIPE'])
44 env.Prepend(LIBS = [llvmpipe])
45
46 if env['swr']:
47 env.Append(CPPDEFINES = 'GALLIUM_SWR')
48 env.Prepend(LIBS = [swr])
49
50 if env['platform'] != 'darwin':
51 # Disallow undefined symbols, except with Address Sanitizer, since libasan
52 # is not linked on shared libs, as it should be LD_PRELOAD'ed instead
53 if not env['asan']:
54 env.Append(SHLINKFLAGS = [
55 '-Wl,-z,defs',
56 ])
57 env.Append(SHLINKFLAGS = [
58 # Restrict exported symbols
59 '-Wl,--version-script=%s' % File("libgl-xlib.sym").srcnode().path,
60 ])
61
62 # libGL.so.1.5
63 libgl_1_5 = env.SharedLibrary(
64 target ='GL',
65 source = sources,
66 SHLIBSUFFIX = env['SHLIBSUFFIX'] + '.1.5',
67 )
68
69 # libGL.so.1
70 libgl = env.subst('${SHLIBPREFIX}GL${SHLIBSUFFIX}')
71 libgl_1 = libgl + '.1'
72 env.Command(libgl_1, libgl_1_5, "ln -sf ${SOURCE.file} ${TARGET}")
73 env.Command(libgl, libgl_1, "ln -sf ${SOURCE.file} ${TARGET}")
74
75 env.Alias('libgl-xlib', libgl)