1Import('*') 2 3env = drienv.Clone() 4 5if env['suncc']: 6 print('warning: not building dri-vmwgfx') 7 Return() 8 9env.Append(CPPPATH = [ 10 '#/src/loader', 11 '#/src/mapi', 12 '#/src/mesa', 13 '#/src/mesa/drivers/dri/common', 14 '#/src/gallium/frontends/dri', 15]) 16 17if env['llvm']: 18 env.Append(CPPDEFINES = 'GALLIUM_LLVMPIPE') 19 env.Prepend(LIBS = [llvmpipe]) 20 21env.PkgUseModules('DRM') 22 23env.Append(CPPDEFINES = [ 24 'GALLIUM_VMWGFX', 25 'GALLIUM_SOFTPIPE', 26]) 27 28env.Prepend(LIBS = [ 29 st_dri, 30 svgadrm, 31 svga, 32 ws_dri, 33 softpipe, 34 pipe_loader, 35 libloader, 36 mesautil, 37 compiler, 38 mesa, 39 glsl, 40 nir, 41 spirv, 42 gallium, 43 megadrivers_stub, 44 dri_common, 45]) 46 47module = env.LoadableModule( 48 target = 'gallium_dri.so', 49 source = 'target.c', 50 SHLIBPREFIX = '', 51) 52 53# vmwgfx_dri.so 54env.Command('vmwgfx_dri.so', 'gallium_dri.so', "ln -f ${SOURCE} ${TARGET}") 55# swrast_dri.so 56env.Command('swrast_dri.so', 'gallium_dri.so', "ln -f ${SOURCE} ${TARGET}") 57 58env.Alias('dri-vmwgfx', module) 59env.Alias('dri-swrast', module) 60