1848b8605SmrgImport('*') 2848b8605Smrg 3848b8605Smrgenv = drienv.Clone() 4848b8605Smrg 5848b8605Smrgif env['suncc']: 6b8e80941Smrg print('warning: not building dri-vmwgfx') 7848b8605Smrg Return() 8848b8605Smrg 9848b8605Smrgenv.Append(CPPPATH = [ 10848b8605Smrg '#/src/loader', 11848b8605Smrg '#/src/mapi', 12848b8605Smrg '#/src/mesa', 13848b8605Smrg '#/src/mesa/drivers/dri/common', 14848b8605Smrg '#/src/gallium/state_trackers/dri', 15848b8605Smrg]) 16848b8605Smrg 17848b8605Smrgif env['llvm']: 18848b8605Smrg env.Append(CPPDEFINES = 'GALLIUM_LLVMPIPE') 19848b8605Smrg env.Prepend(LIBS = [llvmpipe]) 20848b8605Smrg 21b8e80941Smrgenv.PkgUseModules('DRM') 22b8e80941Smrg 23848b8605Smrgenv.Append(CPPDEFINES = [ 24848b8605Smrg 'GALLIUM_VMWGFX', 25848b8605Smrg 'GALLIUM_SOFTPIPE', 26848b8605Smrg]) 27848b8605Smrg 28848b8605Smrgenv.Prepend(LIBS = [ 29848b8605Smrg st_dri, 30848b8605Smrg svgadrm, 31848b8605Smrg svga, 32848b8605Smrg ws_dri, 33848b8605Smrg softpipe, 34b8e80941Smrg pipe_loader, 35848b8605Smrg libloader, 36848b8605Smrg mesautil, 37b8e80941Smrg compiler, 38848b8605Smrg mesa, 39848b8605Smrg glsl, 40b8e80941Smrg nir, 41b8e80941Smrg spirv, 42848b8605Smrg gallium, 43848b8605Smrg megadrivers_stub, 44848b8605Smrg dri_common, 45848b8605Smrg]) 46848b8605Smrg 47848b8605Smrgmodule = env.LoadableModule( 48848b8605Smrg target = 'gallium_dri.so', 49848b8605Smrg source = 'target.c', 50848b8605Smrg SHLIBPREFIX = '', 51848b8605Smrg) 52848b8605Smrg 53848b8605Smrg# vmwgfx_dri.so 54848b8605Smrgenv.Command('vmwgfx_dri.so', 'gallium_dri.so', "ln -f ${SOURCE} ${TARGET}") 55848b8605Smrg# swrast_dri.so 56848b8605Smrgenv.Command('swrast_dri.so', 'gallium_dri.so', "ln -f ${SOURCE} ${TARGET}") 57848b8605Smrg 58848b8605Smrgenv.Alias('dri-vmwgfx', module) 59848b8605Smrgenv.Alias('dri-swrast', module) 60