1Import('*') 2 3env = env.Clone() 4 5env.Prepend(CPPPATH = [ 6 '#src/mapi', 7 '#src/mesa', 8 #Dir('../../../mapi'), # src/mapi build path for python-generated GL API files/headers 9]) 10 11env.Prepend(LIBS = [ 12 st_osmesa, 13 ws_null, 14 glapi, 15 compiler, 16 mesa, 17 gallium, 18 glsl, 19 nir, 20 spirv, 21 mesautil, 22 softpipe 23]) 24 25env.Append(CPPDEFINES = ['GALLIUM_SOFTPIPE']) 26 27sources = ['target.c'] 28 29if env['llvm']: 30 env.Append(CPPDEFINES = 'GALLIUM_LLVMPIPE') 31 env.Prepend(LIBS = [llvmpipe]) 32 33 if env['swr']: 34 env.Append(CPPDEFINES = 'GALLIUM_SWR') 35 env.Prepend(LIBS = [swr]) 36 37if env['platform'] == 'windows': 38 if env['gcc'] and env['machine'] != 'x86_64': 39 sources += ['osmesa.mingw.def'] 40 else: 41 sources += ['osmesa.def'] 42 # Link with winsock2 library 43 env.Append(LIBS = ['ws2_32']) 44 45 46gallium_osmesa = env.SharedLibrary( 47 target ='osmesa', 48 source = sources, 49 LIBS = env['LIBS'], 50) 51 52env.Alias('osmesa', gallium_osmesa) 53