1848b8605SmrgImport('*')
2848b8605Smrg
3848b8605Smrgfrom sys import executable as python_cmd
4848b8605Smrg
5848b8605Smrgenv.Append(CPPPATH = [
6848b8605Smrg    '#src',
7848b8605Smrg    'indices',
8848b8605Smrg    'util',
9848b8605Smrg])
10848b8605Smrg
11b8e80941Smrgenv = env.Clone()
12b8e80941Smrg
13b8e80941Smrgenv.MSVC2013Compat()
14b8e80941Smrg
15848b8605Smrgenv.CodeGenerate(
16b8e80941Smrg    target = 'indices/u_indices_gen.c',
17b8e80941Smrg    script = 'indices/u_indices_gen.py',
18848b8605Smrg    source = [],
19848b8605Smrg    command = python_cmd + ' $SCRIPT > $TARGET'
20848b8605Smrg)
21848b8605Smrg
22848b8605Smrgenv.CodeGenerate(
23b8e80941Smrg    target = 'indices/u_unfilled_gen.c',
24b8e80941Smrg    script = 'indices/u_unfilled_gen.py',
25848b8605Smrg    source = [],
26848b8605Smrg    command = python_cmd + ' $SCRIPT > $TARGET'
27848b8605Smrg)
28848b8605Smrg
29848b8605Smrgenv.CodeGenerate(
30848b8605Smrg    target = 'util/u_format_table.c',
31848b8605Smrg    script = '#src/gallium/auxiliary/util/u_format_table.py',
32848b8605Smrg    source = ['#src/gallium/auxiliary/util/u_format.csv'],
33848b8605Smrg    command = python_cmd + ' $SCRIPT $SOURCE > $TARGET'
34848b8605Smrg)
35848b8605Smrg
36848b8605Smrgenv.Depends('util/u_format_table.c', [
37848b8605Smrg    '#src/gallium/auxiliary/util/u_format_parse.py',
38b8e80941Smrg    'util/u_format_pack.py',
39848b8605Smrg])
40848b8605Smrg
41848b8605Smrgsource = env.ParseSourceList('Makefile.sources', [
42848b8605Smrg    'C_SOURCES',
43b8e80941Smrg    'VL_STUB_SOURCES',
44848b8605Smrg    'GENERATED_SOURCES'
45848b8605Smrg])
46848b8605Smrg
47848b8605Smrgif env['llvm']:
48848b8605Smrg    source += env.ParseSourceList('Makefile.sources', [
49848b8605Smrg        'GALLIVM_SOURCES',
50848b8605Smrg    ])
51848b8605Smrg
52848b8605Smrggallium = env.ConvenienceLibrary(
53848b8605Smrg    target = 'gallium',
54848b8605Smrg    source = source,
55848b8605Smrg)
56848b8605Smrg
57848b8605Smrgenv.Alias('gallium', gallium)
58848b8605Smrg
59848b8605SmrgExport('gallium')
60