
There are differences in where end-of-line comments are placed, but 'diff -wud' is clean. v2: Massive rebase. v3: With much help from José Fonseca, fix SCons build. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Matt Turner <mattst88@gmail.com> Acked-by: Dylan Baker <dylan@pnwbakers.com>
75 lines
1.6 KiB
Plaintext
75 lines
1.6 KiB
Plaintext
import common
|
|
|
|
Import('*')
|
|
|
|
from sys import executable as python_cmd
|
|
|
|
env = env.Clone()
|
|
|
|
env.MSVC2013Compat()
|
|
|
|
env.Prepend(CPPPATH = [
|
|
'#include',
|
|
'#src',
|
|
'#src/mapi',
|
|
'#src/mesa',
|
|
'#src/gallium/include',
|
|
'#src/gallium/auxiliary',
|
|
'#src/compiler/nir',
|
|
])
|
|
|
|
# Make generated headers reachable from the include path.
|
|
env.Prepend(CPPPATH = [Dir('.').abspath, Dir('glsl').abspath])
|
|
env.Prepend(CPPPATH = [Dir('.').abspath, Dir('nir').abspath])
|
|
|
|
# nir generated sources
|
|
|
|
nir_builder_opcodes_h = env.CodeGenerate(
|
|
target = 'nir/nir_builder_opcodes.h',
|
|
script = 'nir/nir_builder_opcodes_h.py',
|
|
source = [],
|
|
command = python_cmd + ' $SCRIPT > $TARGET'
|
|
)
|
|
|
|
env.CodeGenerate(
|
|
target = 'nir/nir_constant_expressions.c',
|
|
script = 'nir/nir_constant_expressions.py',
|
|
source = [],
|
|
command = python_cmd + ' $SCRIPT > $TARGET'
|
|
)
|
|
|
|
env.CodeGenerate(
|
|
target = 'nir/nir_opcodes.h',
|
|
script = 'nir/nir_opcodes_h.py',
|
|
source = [],
|
|
command = python_cmd + ' $SCRIPT > $TARGET'
|
|
)
|
|
|
|
env.CodeGenerate(
|
|
target = 'nir/nir_opcodes.c',
|
|
script = 'nir/nir_opcodes_c.py',
|
|
source = [],
|
|
command = python_cmd + ' $SCRIPT > $TARGET'
|
|
)
|
|
|
|
env.CodeGenerate(
|
|
target = 'nir/nir_opt_algebraic.c',
|
|
script = 'nir/nir_opt_algebraic.py',
|
|
source = [],
|
|
command = python_cmd + ' $SCRIPT > $TARGET'
|
|
)
|
|
|
|
# parse Makefile.sources
|
|
source_lists = env.ParseSourceList('Makefile.sources')
|
|
|
|
nir_sources = source_lists['NIR_FILES']
|
|
nir_sources += source_lists['NIR_GENERATED_FILES']
|
|
|
|
nir = env.ConvenienceLibrary(
|
|
target = 'nir',
|
|
source = nir_sources,
|
|
)
|
|
|
|
env.Alias('nir', nir)
|
|
Export('nir')
|