1Import('*')
2
3from sys import executable as python_cmd
4
5env.Append(CPPPATH = [
6    '#src',
7    'indices',
8    'util',
9])
10
11env = env.Clone()
12
13env.MSVC2013Compat()
14
15env.CodeGenerate(
16    target = 'indices/u_indices_gen.c',
17    script = 'indices/u_indices_gen.py',
18    source = [],
19    command = python_cmd + ' $SCRIPT > $TARGET'
20)
21
22env.CodeGenerate(
23    target = 'indices/u_unfilled_gen.c',
24    script = 'indices/u_unfilled_gen.py',
25    source = [],
26    command = python_cmd + ' $SCRIPT > $TARGET'
27)
28
29env.CodeGenerate(
30    target = 'util/u_format_table.c',
31    script = '#src/gallium/auxiliary/util/u_format_table.py',
32    source = ['#src/gallium/auxiliary/util/u_format.csv'],
33    command = python_cmd + ' $SCRIPT $SOURCE > $TARGET'
34)
35
36env.Depends('util/u_format_table.c', [
37    '#src/gallium/auxiliary/util/u_format_parse.py',
38    'util/u_format_pack.py',
39])
40
41source = env.ParseSourceList('Makefile.sources', [
42    'C_SOURCES',
43    'VL_STUB_SOURCES',
44    'GENERATED_SOURCES'
45])
46
47if env['llvm']:
48    source += env.ParseSourceList('Makefile.sources', [
49        'GALLIVM_SOURCES',
50    ])
51
52gallium = env.ConvenienceLibrary(
53    target = 'gallium',
54    source = source,
55)
56
57env.Alias('gallium', gallium)
58
59Export('gallium')
60