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
60
61
62
63
64
65
|
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['build'] == 'release':
env.Append(CPPDEFINES = ['GALLIUM_RBUG'])
env.Prepend(LIBS = [rbug])
else:
env.Append(CPPDEFINES = ['GALLIUM_TRACE', 'GALLIUM_RBUG', 'GALLIUM_GALAHAD'])
env.Prepend(LIBS = [trace, rbug, galahad])
if env['llvm']:
env.Append(CPPDEFINES = 'GALLIUM_LLVMPIPE')
env.Prepend(LIBS = [llvmpipe])
env.Append(CPPDEFINES = [
'GALLIUM_VMWGFX',
'GALLIUM_SOFTPIPE',
'DRI_TARGET',
'HAVE_LIBDRM',
])
env.Prepend(LIBS = [
st_dri,
svgadrm,
svga,
ws_dri,
ws_kms_dri,
softpipe,
libloader,
mesa,
glsl,
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}")
# kms_swrast_dri.so
env.Command('kms_swrast_dri.so', 'gallium_dri.so', "ln -f ${SOURCE} ${TARGET}")
env.Alias('dri-vmwgfx', module)
env.Alias('dri-swrast', module)
env.Alias('dri-kms-swrast', module)
|