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('nir').abspath])
24 # nir generated sources
26 nir_builder_opcodes_h = env.CodeGenerate(
27 target = 'nir/nir_builder_opcodes.h',
28 script = 'nir/nir_builder_opcodes_h.py',
30 command = python_cmd + ' $SCRIPT > $TARGET'
34 target = 'nir/nir_constant_expressions.c',
35 script = 'nir/nir_constant_expressions.py',
37 command = python_cmd + ' $SCRIPT > $TARGET'
41 target = 'nir/nir_opcodes.h',
42 script = 'nir/nir_opcodes_h.py',
44 command = python_cmd + ' $SCRIPT > $TARGET'
48 target = 'nir/nir_opcodes.c',
49 script = 'nir/nir_opcodes_c.py',
51 command = python_cmd + ' $SCRIPT > $TARGET'
55 target = 'nir/nir_opt_algebraic.c',
56 script = 'nir/nir_opt_algebraic.py',
58 command = python_cmd + ' $SCRIPT > $TARGET'
61 # parse Makefile.sources
62 source_lists = env.ParseSourceList('Makefile.sources')
64 nir_sources = source_lists['NIR_FILES']
65 nir_sources += source_lists['NIR_GENERATED_FILES']
67 nir = env.ConvenienceLibrary(