199f11d0e18e1ff5a433c84d52ffc13b9684c2650Keith Whitwell####################################################################### 299f11d0e18e1ff5a433c84d52ffc13b9684c2650Keith Whitwell# SConscript for xlib winsys 399f11d0e18e1ff5a433c84d52ffc13b9684c2650Keith Whitwell 499f11d0e18e1ff5a433c84d52ffc13b9684c2650Keith WhitwellImport('*') 599f11d0e18e1ff5a433c84d52ffc13b9684c2650Keith Whitwell 699f11d0e18e1ff5a433c84d52ffc13b9684c2650Keith Whitwellenv = env.Clone() 799f11d0e18e1ff5a433c84d52ffc13b9684c2650Keith Whitwell 899f11d0e18e1ff5a433c84d52ffc13b9684c2650Keith Whitwellenv.Append(CPPPATH = [ 9296adbd545b8efd38c9ed508166b2de2764a444bChia-I Wu '#/src/mapi', 1099f11d0e18e1ff5a433c84d52ffc13b9684c2650Keith Whitwell '#/src/mesa', 1199f11d0e18e1ff5a433c84d52ffc13b9684c2650Keith Whitwell '#/src/mesa/main', 1299f11d0e18e1ff5a433c84d52ffc13b9684c2650Keith Whitwell '#src/gallium/state_trackers/glx/xlib', 1399f11d0e18e1ff5a433c84d52ffc13b9684c2650Keith Whitwell]) 1499f11d0e18e1ff5a433c84d52ffc13b9684c2650Keith Whitwell 1599f11d0e18e1ff5a433c84d52ffc13b9684c2650Keith Whitwellenv.Append(CPPDEFINES = ['USE_XSHM']) 1699f11d0e18e1ff5a433c84d52ffc13b9684c2650Keith Whitwell 17601498ae73e654c2de997ea75075613a694d604dJosé Fonsecaenv.Prepend(LIBS = env['X11_LIBS']) 18601498ae73e654c2de997ea75075613a694d604dJosé Fonseca 19bb770af3a59e5935c108c05ee45490fc5668d4a3Chia-I Wu# when GLES is enabled, gl* and _glapi_* belong to bridge_glapi and 20bb770af3a59e5935c108c05ee45490fc5668d4a3Chia-I Wu# shared_glapi respectively 21bb770af3a59e5935c108c05ee45490fc5668d4a3Chia-I Wuif env['gles']: 22bb770af3a59e5935c108c05ee45490fc5668d4a3Chia-I Wu env.Prepend(LIBPATH = [shared_glapi.dir]) 23bb770af3a59e5935c108c05ee45490fc5668d4a3Chia-I Wu glapi = [bridge_glapi, 'glapi'] 24bb770af3a59e5935c108c05ee45490fc5668d4a3Chia-I Wu 25c27ffc5215573d6ff106d4770168117adea884f9José Fonsecaenv.Prepend(LIBS = [ 26c27ffc5215573d6ff106d4770168117adea884f9José Fonseca st_xlib, 27c27ffc5215573d6ff106d4770168117adea884f9José Fonseca ws_xlib, 28c27ffc5215573d6ff106d4770168117adea884f9José Fonseca glapi, 29c27ffc5215573d6ff106d4770168117adea884f9José Fonseca mesa, 30c27ffc5215573d6ff106d4770168117adea884f9José Fonseca glsl, 31c27ffc5215573d6ff106d4770168117adea884f9José Fonseca gallium, 32c27ffc5215573d6ff106d4770168117adea884f9José Fonseca]) 33c27ffc5215573d6ff106d4770168117adea884f9José Fonseca 3499f11d0e18e1ff5a433c84d52ffc13b9684c2650Keith Whitwellsources = [ 3599f11d0e18e1ff5a433c84d52ffc13b9684c2650Keith Whitwell 'xlib.c', 3699f11d0e18e1ff5a433c84d52ffc13b9684c2650Keith Whitwell] 3799f11d0e18e1ff5a433c84d52ffc13b9684c2650Keith Whitwell 38dff36e900c645401b26c9a44106459e96ee7a24dBrian Paul# The sources depend on the python-generated GL API files/headers. 39dff36e900c645401b26c9a44106459e96ee7a24dBrian Paulenv.Depends(sources, glapi_headers) 40dff36e900c645401b26c9a44106459e96ee7a24dBrian Paul 4147a89e9255846f55efe0992c94b65ae7c911dbb3José Fonsecaif True: 423dcc3153b087a2ec42e6177d965dd8b2c95779c2José Fonseca env.Append(CPPDEFINES = ['GALLIUM_TRACE', 'GALLIUM_RBUG', 'GALLIUM_GALAHAD', 'GALLIUM_SOFTPIPE']) 433dcc3153b087a2ec42e6177d965dd8b2c95779c2José Fonseca env.Prepend(LIBS = [trace, rbug, galahad, softpipe]) 4499f11d0e18e1ff5a433c84d52ffc13b9684c2650Keith Whitwell 4547a89e9255846f55efe0992c94b65ae7c911dbb3José Fonsecaif env['llvm']: 463dcc3153b087a2ec42e6177d965dd8b2c95779c2José Fonseca env.Append(CPPDEFINES = ['GALLIUM_LLVMPIPE']) 47ea532f0e725bd68e7784189c9b7f6f7bf7f9d901José Fonseca env.Prepend(LIBS = [llvmpipe]) 4899f11d0e18e1ff5a433c84d52ffc13b9684c2650Keith Whitwell 4961efad6865978b641cdacc4c087c2e623b1eab11José Fonseca# libGL.so.1.5 5061efad6865978b641cdacc4c087c2e623b1eab11José Fonsecalibgl_1_5 = env.SharedLibrary( 5199f11d0e18e1ff5a433c84d52ffc13b9684c2650Keith Whitwell target ='GL', 5299f11d0e18e1ff5a433c84d52ffc13b9684c2650Keith Whitwell source = sources, 5361efad6865978b641cdacc4c087c2e623b1eab11José Fonseca SHLIBSUFFIX = env['SHLIBSUFFIX'] + '.1.5', 5499f11d0e18e1ff5a433c84d52ffc13b9684c2650Keith Whitwell) 5599f11d0e18e1ff5a433c84d52ffc13b9684c2650Keith Whitwell 5661efad6865978b641cdacc4c087c2e623b1eab11José Fonseca# libGL.so.1 5761efad6865978b641cdacc4c087c2e623b1eab11José Fonsecalibgl = env.subst('${SHLIBPREFIX}GL${SHLIBSUFFIX}') 5861efad6865978b641cdacc4c087c2e623b1eab11José Fonsecalibgl_1 = libgl + '.1' 5961efad6865978b641cdacc4c087c2e623b1eab11José Fonsecaenv.Command(libgl_1, libgl_1_5, "ln -sf ${SOURCE.file} ${TARGET}") 6061efad6865978b641cdacc4c087c2e623b1eab11José Fonsecaenv.Command(libgl, libgl_1, "ln -sf ${SOURCE.file} ${TARGET}") 61601498ae73e654c2de997ea75075613a694d604dJosé Fonseca 62601498ae73e654c2de997ea75075613a694d604dJosé Fonsecaenv.Alias('libgl-xlib', libgl) 63