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/state_trackers/dri', 15]) 16 17if env['build'] == 'release': 18 env.Append(CPPDEFINES = ['GALLIUM_RBUG']) 19 env.Prepend(LIBS = [rbug]) 20else: 21 env.Append(CPPDEFINES = ['GALLIUM_TRACE', 'GALLIUM_RBUG']) 22 env.Prepend(LIBS = [trace, rbug]) 23 24if env['llvm']: 25 env.Append(CPPDEFINES = 'GALLIUM_LLVMPIPE') 26 env.Prepend(LIBS = [llvmpipe]) 27 28env.PkgUseModules('DRM') 29 30env.Append(CPPDEFINES = [ 31 'GALLIUM_VMWGFX', 32 'GALLIUM_SOFTPIPE', 33]) 34 35env.Prepend(LIBS = [ 36 st_dri, 37 svgadrm, 38 svga, 39 ws_dri, 40 softpipe, 41 pipe_loader, 42 libloader, 43 mesautil, 44 compiler, 45 mesa, 46 glsl, 47 nir, 48 gallium, 49 megadrivers_stub, 50 dri_common, 51]) 52 53module = env.LoadableModule( 54 target = 'gallium_dri.so', 55 source = 'target.c', 56 SHLIBPREFIX = '', 57) 58 59# vmwgfx_dri.so 60env.Command('vmwgfx_dri.so', 'gallium_dri.so', "ln -f ${SOURCE} ${TARGET}") 61# swrast_dri.so 62env.Command('swrast_dri.so', 'gallium_dri.so', "ln -f ${SOURCE} ${TARGET}") 63 64env.Alias('dri-vmwgfx', module) 65env.Alias('dri-swrast', module) 66