5 from sys import executable as python_cmd
11 env.Prepend(CPPPATH = [
16 '#src/gallium/include',
17 '#src/gallium/auxiliary',
21 # Make generated headers reachable from the include path.
22 env.Prepend(CPPPATH = [Dir('.').abspath, Dir('glsl').abspath])
23 env.Prepend(CPPPATH = [Dir('.').abspath, Dir('nir').abspath])
25 # nir generated sources
27 nir_builder_opcodes_h = env.CodeGenerate(
28 target = 'nir/nir_builder_opcodes.h',
29 script = 'nir/nir_builder_opcodes_h.py',
31 command = python_cmd + ' $SCRIPT > $TARGET'
35 target = 'nir/nir_constant_expressions.c',
36 script = 'nir/nir_constant_expressions.py',
38 command = python_cmd + ' $SCRIPT > $TARGET'
42 target = 'nir/nir_opcodes.h',
43 script = 'nir/nir_opcodes_h.py',
45 command = python_cmd + ' $SCRIPT > $TARGET'
49 target = 'nir/nir_opcodes.c',
50 script = 'nir/nir_opcodes_c.py',
52 command = python_cmd + ' $SCRIPT > $TARGET'
56 target = 'nir/nir_opt_algebraic.c',
57 script = 'nir/nir_opt_algebraic.py',
59 command = python_cmd + ' $SCRIPT > $TARGET'
62 bldroot = Dir('.').abspath
65 target = 'nir/nir_intrinsics.h',
66 script = 'nir/nir_intrinsics_h.py',
68 command = python_cmd + ' $SCRIPT --outdir ' + bldroot + '/nir'
72 target = 'nir/nir_intrinsics.c',
73 script = 'nir/nir_intrinsics_c.py',
75 command = python_cmd + ' $SCRIPT --outdir ' + bldroot + '/nir'
78 # parse Makefile.sources
79 source_lists = env.ParseSourceList('Makefile.sources')
81 nir_sources = source_lists['NIR_FILES']
82 nir_sources += source_lists['NIR_GENERATED_FILES']
84 nir = env.ConvenienceLibrary(