Added few more stubs so that control reaches to DestroyDevice().
[mesa.git] / src / util / SConscript
1 import common
2
3 Import('*')
4
5 from sys import executable as python_cmd
6
7 env = env.Clone()
8
9 env.MSVC2013Compat()
10
11 env.Prepend(CPPPATH = [
12 '#include',
13 '#src',
14 '#src/mapi',
15 '#src/mesa',
16 '#src/gallium/include',
17 '#src/gallium/auxiliary',
18 '#src/util',
19 '#src/util/format',
20 env.Dir('format'), # Build path corresponding to src/util/format
21 ])
22
23 env.CodeGenerate(
24 target = 'format_srgb.c',
25 script = 'format_srgb.py',
26 source = [],
27 command = python_cmd + ' $SCRIPT > $TARGET'
28 )
29
30 env.CodeGenerate(
31 target = 'format/u_format_pack.h',
32 script = 'format/u_format_table.py',
33 source = ['format/u_format.csv'],
34 command = python_cmd + ' $SCRIPT $SOURCE --header > $TARGET'
35 )
36
37 env.Depends('format/u_format_pack.h', [
38 'format/u_format_parse.py',
39 'format/u_format_pack.py',
40 ])
41
42 env.CodeGenerate(
43 target = 'format/u_format_table.c',
44 script = 'format/u_format_table.py',
45 source = ['format/u_format.csv'],
46 command = python_cmd + ' $SCRIPT $SOURCE > $TARGET'
47 )
48
49 env.Depends('format/u_format_table.c', [
50 'format/u_format_parse.py',
51 'format/u_format_pack.py',
52 ])
53
54 # parse Makefile.sources
55 source_lists = env.ParseSourceList('Makefile.sources')
56
57 mesautil_sources = (
58 source_lists['MESA_UTIL_FILES'] +
59 source_lists['MESA_UTIL_GENERATED_FILES']
60 )
61
62 mesautilenv = env.Clone()
63
64 if env['dri']:
65 mesautil_sources += source_lists['XMLCONFIG_FILES']
66
67 mesautilenv.AppendUnique(LIBS = [
68 'expat',
69 ])
70
71 mesautil = mesautilenv.ConvenienceLibrary(
72 target = 'mesautil',
73 source = mesautil_sources,
74 )
75
76 env.Alias('mesautil', mesautil)
77 Export('mesautil')
78
79
80 u_atomic_test = env.Program(
81 target = 'u_atomic_test',
82 source = ['u_atomic_test.c'],
83 )
84 env.UnitTest("u_atomic_test", u_atomic_test)
85
86 roundeven_test = env.Program(
87 target = 'roundeven_test',
88 source = ['roundeven_test.c'],
89 )
90 env.UnitTest("roundeven_test", roundeven_test)
91
92 env.Prepend(LIBS = [mesautil])
93 mesa_sha1_test = env.Program(
94 target = 'mesa-sha1_test',
95 source = ['mesa-sha1_test.c'],
96 )
97 env.UnitTest("mesa-sha1_test", mesa_sha1_test)