SConscript revision cdb7396390b0afffc0d33c9aba2898012802e6d0
1Import('*') 2 3from sys import executable as python_cmd 4 5env.Append(CPPPATH = [ 6 'indices', 7 'util', 8]) 9 10env.CodeGenerate( 11 target = 'indices/u_indices_gen.c', 12 script = 'indices/u_indices_gen.py', 13 source = [], 14 command = python_cmd + ' $SCRIPT > $TARGET' 15) 16 17env.CodeGenerate( 18 target = 'indices/u_unfilled_gen.c', 19 script = 'indices/u_unfilled_gen.py', 20 source = [], 21 command = python_cmd + ' $SCRIPT > $TARGET' 22) 23 24env.CodeGenerate( 25 target = 'util/u_format_srgb.c', 26 script = 'util/u_format_srgb.py', 27 source = [], 28 command = python_cmd + ' $SCRIPT > $TARGET' 29) 30 31env.CodeGenerate( 32 target = 'util/u_format_table.c', 33 script = '#src/gallium/auxiliary/util/u_format_table.py', 34 source = ['#src/gallium/auxiliary/util/u_format.csv'], 35 command = python_cmd + ' $SCRIPT $SOURCE > $TARGET' 36) 37 38env.CodeGenerate( 39 target = 'util/u_half.c', 40 script = 'util/u_half.py', 41 source = [], 42 command = python_cmd + ' $SCRIPT > $TARGET' 43) 44 45env.Depends('util/u_format_table.c', [ 46 '#src/gallium/auxiliary/util/u_format_parse.py', 47 'util/u_format_pack.py', 48]) 49 50source = env.ParseSourceList('Makefile.sources', [ 51 'C_SOURCES', 52 'GENERATED_SOURCES' 53]) 54 55if env['llvm']: 56 source += env.ParseSourceList('Makefile.sources', [ 57 'GALLIVM_SOURCES', 58 'GALLIVM_CPP_SOURCES' 59 ]) 60 61 if env['toolchain'] == 'crossmingw': 62 # compile lp_bld_misc.cpp without -gstabs option 63 source = env.compile_without_gstabs(source, "gallivm/lp_bld_misc.cpp") 64 65gallium = env.ConvenienceLibrary( 66 target = 'gallium', 67 source = source, 68) 69 70env.Alias('gallium', gallium) 71 72Export('gallium') 73