summaryrefslogtreecommitdiffstats
path: root/src/gallium/targets/dri/SConscript
blob: 69cce3e95fa193c8ebd8eb56b7789596c82ba076 (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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
Import('*')

env = drienv.Clone()

if env['suncc']:
    print('warning: not building dri-vmwgfx')
    Return()

env.Append(CPPPATH = [
    '#/src/loader',
    '#/src/mapi',
    '#/src/mesa',
    '#/src/mesa/drivers/dri/common',
    '#/src/gallium/state_trackers/dri',
])

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

env.PkgUseModules('DRM')

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

env.Prepend(LIBS = [
    st_dri,
    svgadrm,
    svga,
    ws_dri,
    softpipe,
    pipe_loader,
    libloader,
    mesautil,
    compiler,
    mesa,
    glsl,
    nir,
    spirv,
    gallium,
    megadrivers_stub,
    dri_common,
])

module = env.LoadableModule(
    target = 'gallium_dri.so',
    source = 'target.c',
    SHLIBPREFIX = '',
)

# vmwgfx_dri.so
env.Command('vmwgfx_dri.so', 'gallium_dri.so', "ln -f ${SOURCE} ${TARGET}")
# swrast_dri.so
env.Command('swrast_dri.so', 'gallium_dri.so', "ln -f ${SOURCE} ${TARGET}")

env.Alias('dri-vmwgfx', module)
env.Alias('dri-swrast', module)