5 from sys import executable as python_cmd
11 env.Prepend(CPPPATH = [
16 '#src/gallium/include',
17 '#src/gallium/auxiliary',
19 '#src/compiler/spirv',
22 # Make generated headers reachable from the include path.
23 env.Prepend(CPPPATH = [Dir('.').abspath, Dir('nir').abspath])
24 env.Prepend(CPPPATH = [Dir('.').abspath, Dir('spirv').abspath])
26 # spirv generated sources
29 target = 'spirv/spirv_info.c',
30 script = 'spirv/spirv_info_c.py',
31 source = ['spirv/spirv.core.grammar.json'],
32 command = python_cmd + ' $SCRIPT $SOURCE $TARGET'
36 target = 'spirv/vtn_gather_types.c',
37 script = 'spirv/vtn_gather_types_c.py',
38 source = ['spirv/spirv.core.grammar.json'],
39 command = python_cmd + ' $SCRIPT $SOURCE $TARGET'
42 # parse Makefile.sources
43 source_lists = env.ParseSourceList('Makefile.sources')
45 spirv_sources = source_lists['SPIRV_FILES']
46 spirv_sources += source_lists['SPIRV_GENERATED_FILES']
48 spirv = env.ConvenienceLibrary(
50 source = spirv_sources,
53 env.Alias('spirv', spirv)