1Import('*') 2 3env = env.Clone() 4 5env.Append(CPPPATH = [ 6 '#/src', 7 '#/src/mapi', 8 '#/src/mesa', 9 '#/src/mesa/main', 10 Dir('../../../mapi'), # src/mapi build path for python-generated GL API files/headers 11]) 12 13env.Append(CPPDEFINES = ['USE_XSHM']) 14 15env.Prepend(LIBS = env['X11_LIBS']) 16env.Prepend(LIBPATH = env['X11_LIBPATH']) 17 18env.Prepend(LIBS = [ 19 glapi, 20 mesautil, 21 compiler, 22 glsl, 23 mesa, 24 spirv, 25 nir, 26]) 27 28sources = [ 29 'fakeglx.c', 30 'glxapi.c', 31 'xfonts.c', 32 'xm_api.c', 33 'xm_buffer.c', 34 'xm_dd.c', 35 'xm_line.c', 36 'xm_tri.c', 37] 38 39if env['platform'] != 'darwin': 40 # Disallow undefined symbols, except with Address Sanitizer, since libasan 41 # is not linked on shared libs, as it should be LD_PRELOAD'ed instead 42 if not env['asan']: 43 env.Append(SHLINKFLAGS = [ 44 '-Wl,-z,defs', 45 ]) 46 47# libGL.so.1.6 48libgl_1_6 = env.SharedLibrary( 49 target ='GL', 50 source = sources, 51 SHLIBSUFFIX = env['SHLIBSUFFIX'] + '.1.6', 52) 53 54# libGL.so.1 55libgl = env.subst('${SHLIBPREFIX}GL${SHLIBSUFFIX}') 56libgl_1 = libgl + '.1' 57env.Command(libgl_1, libgl_1_6, "ln -sf ${SOURCE.file} ${TARGET}") 58env.Command(libgl, libgl_1, "ln -sf ${SOURCE.file} ${TARGET}") 59 60env.Alias('libgl-xlib-swrast', libgl) 61