xmlconfig: move into src/util
[mesa.git] / src / util / SConscript
1 import common
2
3 Import('*')
4
5 SConscript([
6 'xmlpool',
7 ])
8
9 from sys import executable as python_cmd
10
11 env = env.Clone()
12
13 env.MSVC2013Compat()
14
15 env.Prepend(CPPPATH = [
16 '#include',
17 xmlpool_options.dir.dir, # Dir to generated xmlpool/options.h
18 '#src',
19 '#src/mapi',
20 '#src/mesa',
21 '#src/gallium/include',
22 '#src/gallium/auxiliary',
23 '#src/util',
24 ])
25
26 env.CodeGenerate(
27 target = 'format_srgb.c',
28 script = 'format_srgb.py',
29 source = [],
30 command = python_cmd + ' $SCRIPT > $TARGET'
31 )
32
33 # parse Makefile.sources
34 source_lists = env.ParseSourceList('Makefile.sources')
35
36 mesautil_sources = (
37 source_lists['MESA_UTIL_FILES'] +
38 source_lists['MESA_UTIL_GENERATED_FILES'] +
39 source_lists['XMLCONFIG_FILES']
40 )
41
42 mesautilenv = env.Clone()
43
44 mesautilenv.AppendUnique(LIBS = [
45 'expat',
46 ])
47
48 mesautil = mesautilenv.ConvenienceLibrary(
49 target = 'mesautil',
50 source = mesautil_sources,
51 )
52
53 env.Alias('mesautil', mesautil)
54 Export('mesautil')
55
56
57 u_atomic_test = env.Program(
58 target = 'u_atomic_test',
59 source = ['u_atomic_test.c'],
60 )
61 env.UnitTest("u_atomic_test", u_atomic_test)
62
63 roundeven_test = env.Program(
64 target = 'roundeven_test',
65 source = ['roundeven_test.c'],
66 )
67 env.UnitTest("roundeven_test", roundeven_test)