SConscript revision 848b8605
1848b8605SmrgImport('*')
2848b8605Smrg
3848b8605Smrgfrom sys import executable as python_cmd
4848b8605Smrg
5848b8605Smrgenv.Append(CPPPATH = [
6848b8605Smrg    '#src',
7848b8605Smrg    'indices',
8848b8605Smrg    'util',
9848b8605Smrg])
10848b8605Smrg
11848b8605Smrgenv.CodeGenerate(
12848b8605Smrg    target = 'indices/u_indices_gen.c', 
13848b8605Smrg    script = 'indices/u_indices_gen.py', 
14848b8605Smrg    source = [],
15848b8605Smrg    command = python_cmd + ' $SCRIPT > $TARGET'
16848b8605Smrg)
17848b8605Smrg
18848b8605Smrgenv.CodeGenerate(
19848b8605Smrg    target = 'indices/u_unfilled_gen.c', 
20848b8605Smrg    script = 'indices/u_unfilled_gen.py', 
21848b8605Smrg    source = [],
22848b8605Smrg    command = python_cmd + ' $SCRIPT > $TARGET'
23848b8605Smrg)
24848b8605Smrg
25848b8605Smrgenv.CodeGenerate(
26848b8605Smrg    target = 'util/u_format_table.c',
27848b8605Smrg    script = '#src/gallium/auxiliary/util/u_format_table.py',
28848b8605Smrg    source = ['#src/gallium/auxiliary/util/u_format.csv'],
29848b8605Smrg    command = python_cmd + ' $SCRIPT $SOURCE > $TARGET'
30848b8605Smrg)
31848b8605Smrg
32848b8605Smrgenv.Depends('util/u_format_table.c', [
33848b8605Smrg    '#src/gallium/auxiliary/util/u_format_parse.py',
34848b8605Smrg    'util/u_format_pack.py', 
35848b8605Smrg])
36848b8605Smrg
37848b8605Smrgsource = env.ParseSourceList('Makefile.sources', [
38848b8605Smrg    'C_SOURCES',
39848b8605Smrg    'GENERATED_SOURCES'
40848b8605Smrg])
41848b8605Smrg
42848b8605Smrgif env['llvm']:
43848b8605Smrg    source += env.ParseSourceList('Makefile.sources', [
44848b8605Smrg        'GALLIVM_SOURCES',
45848b8605Smrg        'GALLIVM_CPP_SOURCES'
46848b8605Smrg    ])
47848b8605Smrg
48848b8605Smrggallium = env.ConvenienceLibrary(
49848b8605Smrg    target = 'gallium',
50848b8605Smrg    source = source,
51848b8605Smrg)
52848b8605Smrg
53848b8605Smrgenv.Alias('gallium', gallium)
54848b8605Smrg
55848b8605SmrgExport('gallium')
56