• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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    trace,
19    glsl,
20    nir,
21    mesautil,
22    softpipe
23])
24
25env.Append(CPPDEFINES = ['GALLIUM_TRACE', '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
43gallium_osmesa = env.SharedLibrary(
44    target ='osmesa',
45    source = sources,
46    LIBS = env['LIBS'],
47)
48
49env.Alias('osmesa', gallium_osmesa)
50