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]) 25 26sources = [ 27 'fakeglx.c', 28 'glxapi.c', 29 'xfonts.c', 30 'xm_api.c', 31 'xm_buffer.c', 32 'xm_dd.c', 33 'xm_line.c', 34 'xm_tri.c', 35] 36 37if env['platform'] != 'darwin': 38 # Disallow undefined symbols, except with Address Sanitizer, since libasan 39 # is not linked on shared libs, as it should be LD_PRELOAD'ed instead 40 if not env['asan']: 41 env.Append(SHLINKFLAGS = [ 42 '-Wl,-z,defs', 43 ]) 44 45# libGL.so.1.6 46libgl_1_6 = env.SharedLibrary( 47 target ='GL', 48 source = sources, 49 SHLIBSUFFIX = env['SHLIBSUFFIX'] + '.1.6', 50) 51 52# libGL.so.1 53libgl = env.subst('${SHLIBPREFIX}GL${SHLIBSUFFIX}') 54libgl_1 = libgl + '.1' 55env.Command(libgl_1, libgl_1_6, "ln -sf ${SOURCE.file} ${TARGET}") 56env.Command(libgl, libgl_1, "ln -sf ${SOURCE.file} ${TARGET}") 57 58env.Alias('libgl-xlib-swrast', libgl) 59