1####################################################################### 2# SConscript for xlib winsys 3 4Import('*') 5 6env = env.Clone() 7 8env.Append(CPPPATH = [ 9 '#/src/mapi', 10 '#/src/mesa', 11 '#/src/mesa/main', 12 '#src/gallium/state_trackers/glx/xlib', 13]) 14 15env.Append(CPPDEFINES = ['USE_XSHM']) 16 17env.Prepend(LIBS = env['X11_LIBS']) 18 19# when GLES is enabled, gl* and _glapi_* belong to bridge_glapi and 20# shared_glapi respectively 21if env['gles']: 22 env.Prepend(LIBPATH = [shared_glapi.dir]) 23 glapi = [bridge_glapi, 'glapi'] 24 25env.Prepend(LIBS = [ 26 st_xlib, 27 ws_xlib, 28 glapi, 29 mesa, 30 glsl, 31 gallium, 32]) 33 34sources = [ 35 'xlib.c', 36] 37 38# The sources depend on the python-generated GL API files/headers. 39env.Depends(sources, glapi_headers) 40 41if True: 42 env.Append(CPPDEFINES = ['GALLIUM_TRACE', 'GALLIUM_RBUG', 'GALLIUM_GALAHAD', 'GALLIUM_SOFTPIPE']) 43 env.Prepend(LIBS = [trace, rbug, galahad, softpipe]) 44 45if env['llvm']: 46 env.Append(CPPDEFINES = ['GALLIUM_LLVMPIPE']) 47 env.Prepend(LIBS = [llvmpipe]) 48 49# libGL.so.1.5 50libgl_1_5 = env.SharedLibrary( 51 target ='GL', 52 source = sources, 53 SHLIBSUFFIX = env['SHLIBSUFFIX'] + '.1.5', 54) 55 56# libGL.so.1 57libgl = env.subst('${SHLIBPREFIX}GL${SHLIBSUFFIX}') 58libgl_1 = libgl + '.1' 59env.Command(libgl_1, libgl_1_5, "ln -sf ${SOURCE.file} ${TARGET}") 60env.Command(libgl, libgl_1, "ln -sf ${SOURCE.file} ${TARGET}") 61 62env.Alias('libgl-xlib', libgl) 63