compiler_objs += mesa_objs
+# GLSL generated sources
+env.CodeGenerate(
+ target = 'glsl/ir_expression_operation.h',
+ script = 'glsl/ir_expression_operation.py',
+ source = [],
+ command = python_cmd + ' $SCRIPT enum > $TARGET'
+)
+env.CodeGenerate(
+ target = 'glsl/ir_expression_operation_constant.h',
+ script = 'glsl/ir_expression_operation.py',
+ source = [],
+ command = python_cmd + ' $SCRIPT constant > $TARGET'
+)
+env.CodeGenerate(
+ target = 'glsl/ir_expression_operation_strings.h',
+ script = 'glsl/ir_expression_operation.py',
+ source = [],
+ command = python_cmd + ' $SCRIPT strings > $TARGET'
+)
+
glsl = env.ConvenienceLibrary(
target = 'glsl',
source = glsl_sources,
Export('glsl')
+#
+# XXX: It's important to not add any generated source files after this point,
+# or it will break MinGW cross-compilation.
+#
+
# Skip building these programs as they will cause SCons error "Two environments
# with different actions were specified for the same target"
if env['crosscompile'] or env['embedded']:
compiler_objs += env.StaticObject("glsl/main.cpp")
-# GLSL generated sources
-
-env.CodeGenerate(
- target = 'glsl/ir_expression_operation.h',
- script = 'glsl/ir_expression_operation.py',
- source = [],
- command = python_cmd + ' $SCRIPT enum > $TARGET'
-)
-env.CodeGenerate(
- target = 'glsl/ir_expression_operation_constant.h',
- script = 'glsl/ir_expression_operation.py',
- source = [],
- command = python_cmd + ' $SCRIPT constant > $TARGET'
-)
-env.CodeGenerate(
- target = 'glsl/ir_expression_operation_strings.h',
- script = 'glsl/ir_expression_operation.py',
- source = [],
- command = python_cmd + ' $SCRIPT strings > $TARGET'
-)
-
glsl_compiler = env.Program(
target = 'glsl_compiler',
source = compiler_objs,