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