scons: More tweaks to fix MinGW build.
This commit is contained in:
@@ -14,19 +14,22 @@ env.Prepend(CPPPATH = [
|
|||||||
'#src/glsl/glcpp',
|
'#src/glsl/glcpp',
|
||||||
])
|
])
|
||||||
|
|
||||||
|
# Make glcpp/glcpp-parse.h and glsl_parser.h reacheable from the include path
|
||||||
|
env.Append(CPPPATH = [Dir('.').abspath])
|
||||||
|
|
||||||
env.Append(YACCFLAGS = '-d')
|
env.Append(YACCFLAGS = '-d')
|
||||||
|
|
||||||
parser_env = env.Clone();
|
parser_env = env.Clone()
|
||||||
parser_env.Append(YACCFLAGS = ['--defines=src/glsl/glsl_parser.h', '-p', '_mesa_glsl_'])
|
parser_env.Append(YACCFLAGS = [
|
||||||
|
'--defines=%s' % File('glsl_parser.h').abspath,
|
||||||
|
'-p', '_mesa_glsl_',
|
||||||
|
])
|
||||||
|
|
||||||
glcpp_lexer = env.CFile('glcpp/glcpp-lex.c', 'glcpp/glcpp-lex.l')
|
glcpp_lexer = env.CFile('glcpp/glcpp-lex.c', 'glcpp/glcpp-lex.l')
|
||||||
glcpp_parser = env.CFile('glcpp/glcpp-parse.c', 'glcpp/glcpp-parse.y')
|
glcpp_parser = env.CFile('glcpp/glcpp-parse.c', 'glcpp/glcpp-parse.y')
|
||||||
glsl_lexer = parser_env.CXXFile('glsl_lexer.cpp', 'glsl_lexer.ll')
|
glsl_lexer = parser_env.CXXFile('glsl_lexer.cpp', 'glsl_lexer.ll')
|
||||||
glsl_parser = parser_env.CXXFile('glsl_parser.cpp', 'glsl_parser.yy')
|
glsl_parser = parser_env.CXXFile('glsl_parser.cpp', 'glsl_parser.yy')
|
||||||
|
|
||||||
# Make glcpp/glcpp-parse.h reacheable from the include path
|
|
||||||
env.Append(CPPPATH = [glcpp_parser[0].dir.up()])
|
|
||||||
|
|
||||||
sources = [
|
sources = [
|
||||||
glcpp_lexer,
|
glcpp_lexer,
|
||||||
glcpp_parser[0],
|
glcpp_parser[0],
|
||||||
@@ -110,6 +113,10 @@ else:
|
|||||||
'#src/mesa/program/symbol_table.c'],
|
'#src/mesa/program/symbol_table.c'],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# SCons builtin dependency scanner doesn't detect that glsl_lexer.ll
|
||||||
|
# depends on glsl_parser.h
|
||||||
|
env.Depends(builtin_compiler, glsl_parser)
|
||||||
|
|
||||||
builtin_glsl_function = env.CodeGenerate(
|
builtin_glsl_function = env.CodeGenerate(
|
||||||
target = 'builtin_function.cpp',
|
target = 'builtin_function.cpp',
|
||||||
script = 'builtins/tools/generate_builtins.py',
|
script = 'builtins/tools/generate_builtins.py',
|
||||||
@@ -132,6 +139,10 @@ glsl = env.ConvenienceLibrary(
|
|||||||
source = sources,
|
source = sources,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# SCons builtin dependency scanner doesn't detect that glsl_lexer.ll depends on
|
||||||
|
# glsl_parser.h
|
||||||
|
env.Depends(glsl, glsl_parser)
|
||||||
|
|
||||||
Export('glsl')
|
Export('glsl')
|
||||||
|
|
||||||
# FIXME: We can't build the programs because there's a cyclic dependency between tis directory and src/mesa
|
# FIXME: We can't build the programs because there's a cyclic dependency between tis directory and src/mesa
|
||||||
|
@@ -220,7 +220,7 @@ program_parse = env.CFile('program/program_parse.tab.c',
|
|||||||
'program/program_parse.y')
|
'program/program_parse.y')
|
||||||
|
|
||||||
# Make program/program_parse.tab.h reacheable from the include path
|
# Make program/program_parse.tab.h reacheable from the include path
|
||||||
env.Append(CPPPATH = [program_parse[0].dir.up()])
|
env.Append(CPPPATH = [Dir('.').abspath])
|
||||||
|
|
||||||
program_sources = [
|
program_sources = [
|
||||||
'program/arbprogparse.c',
|
'program/arbprogparse.c',
|
||||||
|
Reference in New Issue
Block a user