summaryrefslogtreecommitdiffstats
path: root/src/gallium/targets/osmesa/SConscript
blob: 7a2a00c85fe210c309bedb5f135ec6ed8d5d8c62 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
Import('*')

env = env.Clone()

env.Prepend(CPPPATH = [
    '#src/mapi',
    '#src/mesa',
    #Dir('../../../mapi'), # src/mapi build path for python-generated GL API files/headers
])

env.Prepend(LIBS = [
    st_osmesa,
    ws_null,
    glapi,
    compiler,
    mesa,
    gallium,
    trace,
    glsl,
    nir,
    mesautil,
    softpipe
])

env.Append(CPPDEFINES = ['GALLIUM_TRACE', 'GALLIUM_SOFTPIPE'])

sources = ['target.c']

if env['llvm']:
    env.Append(CPPDEFINES = 'GALLIUM_LLVMPIPE')
    env.Prepend(LIBS = [llvmpipe])

if env['platform'] == 'windows':
    if env['gcc'] and env['machine'] != 'x86_64':
        sources += ['osmesa.mingw.def']
    else:
        sources += ['osmesa.def']

gallium_osmesa = env.SharedLibrary(
    target ='osmesa',
    source = sources,
    LIBS = env['LIBS'],
)

env.Alias('osmesa', gallium_osmesa)