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