1 #######################################################################
2 # SConscript for xlib winsys
12 '#src/gallium/state_trackers/glx/xlib',
13 Dir('../../../mapi'), # src/mapi build path for python-generated GL API files/headers
16 env.Append(CPPDEFINES = ['USE_XSHM'])
18 env.Prepend(LIBS = env['X11_LIBS'])
19 env.Prepend(LIBPATH = env['X11_LIBPATH'])
39 env.Append(CPPDEFINES = ['GALLIUM_SOFTPIPE'])
40 env.Prepend(LIBS = [softpipe])
43 env.Append(CPPDEFINES = ['GALLIUM_LLVMPIPE'])
44 env.Prepend(LIBS = [llvmpipe])
47 env.Append(CPPDEFINES = 'GALLIUM_SWR')
48 env.Prepend(LIBS = [swr])
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
54 env.Append(SHLINKFLAGS = [
57 env.Append(SHLINKFLAGS = [
58 # Restrict exported symbols
59 '-Wl,--version-script=%s' % File("libgl-xlib.sym").srcnode().path,
63 libgl_1_5 = env.SharedLibrary(
66 SHLIBSUFFIX = env['SHLIBSUFFIX'] + '.1.5',
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}")
75 env.Alias('libgl-xlib', libgl)