2009-12-10 16:29:04 +00:00
|
|
|
import common
|
|
|
|
|
|
|
|
Import('*')
|
|
|
|
|
|
|
|
env = env.Clone()
|
|
|
|
|
2010-08-13 13:55:34 +01:00
|
|
|
env.Prepend(CPPPATH = [
|
|
|
|
'#src/mapi',
|
|
|
|
'#src/mesa',
|
|
|
|
])
|
|
|
|
|
|
|
|
if env['platform'] == 'windows':
|
|
|
|
env.Prepend(CPPPATH = ['#src/talloc'])
|
|
|
|
|
2009-12-10 16:29:04 +00:00
|
|
|
sources = [
|
2010-08-13 13:55:34 +01:00
|
|
|
'glcpp/glcpp-lex.c',
|
|
|
|
'glcpp/glcpp-parse.c',
|
|
|
|
'glcpp/pp.c',
|
|
|
|
'ast_expr.cpp',
|
|
|
|
'ast_function.cpp',
|
|
|
|
'ast_to_hir.cpp',
|
|
|
|
'ast_type.cpp',
|
|
|
|
'builtin_function.cpp',
|
|
|
|
'glsl_lexer.cpp',
|
|
|
|
'glsl_parser.cpp',
|
|
|
|
'glsl_parser_extras.cpp',
|
|
|
|
'glsl_types.cpp',
|
2010-08-26 18:19:57 +01:00
|
|
|
'glsl_symbol_table.cpp',
|
2010-08-13 13:55:34 +01:00
|
|
|
'hir_field_selection.cpp',
|
|
|
|
'ir_basic_block.cpp',
|
|
|
|
'ir_clone.cpp',
|
2010-11-15 20:54:12 -08:00
|
|
|
'ir_constant_expression.cpp',
|
2010-08-13 13:55:34 +01:00
|
|
|
'ir.cpp',
|
|
|
|
'ir_expression_flattening.cpp',
|
|
|
|
'ir_function_can_inline.cpp',
|
|
|
|
'ir_function.cpp',
|
|
|
|
'ir_hierarchical_visitor.cpp',
|
|
|
|
'ir_hv_accept.cpp',
|
|
|
|
'ir_import_prototypes.cpp',
|
|
|
|
'ir_print_visitor.cpp',
|
|
|
|
'ir_reader.cpp',
|
2010-08-14 12:45:14 +01:00
|
|
|
'ir_rvalue_visitor.cpp',
|
2010-08-13 13:55:34 +01:00
|
|
|
'ir_set_program_inouts.cpp',
|
|
|
|
'ir_validate.cpp',
|
|
|
|
'ir_variable.cpp',
|
|
|
|
'ir_variable_refcount.cpp',
|
|
|
|
'linker.cpp',
|
|
|
|
'link_functions.cpp',
|
2010-09-05 10:16:30 +01:00
|
|
|
'loop_analysis.cpp',
|
|
|
|
'loop_controls.cpp',
|
|
|
|
'loop_unroll.cpp',
|
2010-11-25 01:09:26 -08:00
|
|
|
'lower_discard.cpp',
|
2010-11-15 14:35:46 -08:00
|
|
|
'lower_if_to_cond_assign.cpp',
|
2010-11-18 17:54:07 -08:00
|
|
|
'lower_instructions.cpp',
|
2010-11-15 14:35:46 -08:00
|
|
|
'lower_jumps.cpp',
|
|
|
|
'lower_mat_op_to_vec.cpp',
|
2010-09-10 01:16:19 +02:00
|
|
|
'lower_noise.cpp',
|
2010-09-08 01:35:44 +02:00
|
|
|
'lower_variable_index_to_cond_assign.cpp',
|
2010-11-15 14:35:46 -08:00
|
|
|
'lower_vec_index_to_cond_assign.cpp',
|
|
|
|
'lower_vec_index_to_swizzle.cpp',
|
2010-11-19 17:22:23 -08:00
|
|
|
'lower_vector.cpp',
|
2010-11-15 14:35:46 -08:00
|
|
|
'opt_algebraic.cpp',
|
|
|
|
'opt_constant_folding.cpp',
|
|
|
|
'opt_constant_propagation.cpp',
|
|
|
|
'opt_constant_variable.cpp',
|
|
|
|
'opt_copy_propagation.cpp',
|
|
|
|
'opt_dead_code.cpp',
|
|
|
|
'opt_dead_code_local.cpp',
|
|
|
|
'opt_dead_functions.cpp',
|
2010-11-24 22:02:26 -08:00
|
|
|
'opt_discard_simplification.cpp',
|
2010-11-15 14:35:46 -08:00
|
|
|
'opt_function_inlining.cpp',
|
|
|
|
'opt_if_simplification.cpp',
|
2010-11-15 18:59:39 -07:00
|
|
|
'opt_noop_swizzle.cpp',
|
|
|
|
'opt_redundant_jumps.cpp',
|
2010-11-15 14:35:46 -08:00
|
|
|
'opt_structure_splitting.cpp',
|
|
|
|
'opt_swizzle_swizzle.cpp',
|
|
|
|
'opt_tree_grafting.cpp',
|
2010-08-13 13:55:34 +01:00
|
|
|
's_expression.cpp',
|
2010-12-13 08:41:08 -07:00
|
|
|
'strtod.c',
|
2009-12-10 16:29:04 +00:00
|
|
|
]
|
|
|
|
|
2009-12-28 15:22:17 +00:00
|
|
|
glsl = env.ConvenienceLibrary(
|
2009-12-10 16:29:04 +00:00
|
|
|
target = 'glsl',
|
|
|
|
source = sources,
|
|
|
|
)
|
|
|
|
|
|
|
|
Export('glsl')
|
|
|
|
|
2010-08-13 13:55:34 +01:00
|
|
|
# FIXME: We can't build the programs because there's a cyclic dependency between tis directory and src/mesa
|
|
|
|
Return()
|
|
|
|
|
2009-12-10 16:29:04 +00:00
|
|
|
env = env.Clone()
|
|
|
|
|
|
|
|
if env['platform'] == 'windows':
|
|
|
|
env.PrependUnique(LIBS = [
|
|
|
|
'user32',
|
|
|
|
])
|
|
|
|
|
2010-08-13 13:55:34 +01:00
|
|
|
env.Prepend(LIBS = [glsl, talloc])
|
2009-12-10 16:29:04 +00:00
|
|
|
|
|
|
|
env.Program(
|
2010-08-13 13:55:34 +01:00
|
|
|
target = 'glsl2',
|
|
|
|
source = [
|
|
|
|
'main.cpp',
|
|
|
|
]
|
2009-12-10 16:29:04 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
env.Program(
|
2010-08-13 13:55:34 +01:00
|
|
|
target = 'glcpp',
|
|
|
|
source = ['glcpp/glcpp.c'],
|
2009-12-10 16:29:04 +00:00
|
|
|
)
|