Home | History | Annotate | Download | only in x11
      1 Import('*')
      2 
      3 env = env.Clone()
      4 
      5 env.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 
     13 env.Append(CPPDEFINES = ['USE_XSHM'])
     14 
     15 env.Prepend(LIBS = env['X11_LIBS'])
     16 env.Prepend(LIBPATH = env['X11_LIBPATH'])
     17 
     18 env.Prepend(LIBS = [
     19     glapi,
     20     mesautil,
     21     compiler,
     22     glsl,
     23     mesa,
     24 ])
     25 
     26 sources = [
     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 
     37 if 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
     46 libgl_1_6 = env.SharedLibrary(
     47     target ='GL',
     48     source = sources,
     49     SHLIBSUFFIX = env['SHLIBSUFFIX'] + '.1.6',
     50 )
     51 
     52 # libGL.so.1
     53 libgl = env.subst('${SHLIBPREFIX}GL${SHLIBSUFFIX}')
     54 libgl_1 = libgl + '.1'
     55 env.Command(libgl_1, libgl_1_6, "ln -sf ${SOURCE.file} ${TARGET}")
     56 env.Command(libgl, libgl_1, "ln -sf ${SOURCE.file} ${TARGET}")
     57 
     58 env.Alias('libgl-xlib-swrast', libgl)
     59