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