1 #######################################################################
2 # SConscript for xlib winsys
6 if env['platform'] != 'linux':
9 if 'mesa' not in env['statetrackers']:
10 print 'warning: Mesa state tracker disabled: skipping build of xlib libGL.so'
14 print 'warning: DRI enabled: skipping build of xlib libGL.so'
17 if 'trace' not in env['drivers']:
18 print 'warning: trace pipe driver disabled: skipping build of xlib libGL.so'
21 if not set(('softpipe', 'llvmpipe', 'trace')).intersection(env['drivers']):
22 print 'warning: no supported pipe driver: skipping build of xlib libGL.so'
27 env.Append(CPPPATH = [
30 '#src/gallium/state_trackers/glx/xlib',
33 env.Append(CPPDEFINES = ['USE_XSHM'])
41 if 'softpipe' in env['drivers']:
42 env.Append(CPPDEFINES = 'GALLIUM_SOFTPIPE')
43 sources += ['xlib_softpipe.c']
46 if 'llvmpipe' in env['drivers']:
48 if 'LLVM_VERSION' in env:
49 env.Append(CPPDEFINES = 'GALLIUM_LLVMPIPE')
51 sources += ['xlib_llvmpipe.c']
54 if 'cell' in env['drivers']:
55 env.Append(CPPDEFINES = 'GALLIUM_CELL')
56 sources += ['xlib_cell.c']
59 # TODO: write a wrapper function http://www.scons.org/wiki/WrapperFunctions
60 libgl = env.SharedLibrary(
63 LIBS = st_xlib + glapi + mesa + glsl + drivers + gallium + env['LIBS'],
67 # Only install this libGL.so if DRI not enabled
68 env.InstallSharedLibrary(libgl, version=(1, 5))