1# A simple makefile to build glsl-optimizer on linux 2 3CPPFLAGS += -I../talloc \ 4 -I../mesa \ 5 -I../mapi \ 6 -I../../include \ 7 -I.. 8 9CXXFLAGS += -s -Wall -Os -fdata-sections -ffunction-sections 10CFLAGS += -s -Wall -Os -fdata-sections -ffunction-sections 11 12# This list gleaned from the VC project file. Update when needed 13SRC = ast_array_index.cpp \ 14 ast_expr.cpp \ 15 ast_function.cpp \ 16 ast_to_hir.cpp \ 17 ast_type.cpp \ 18 builtin_functions.cpp \ 19 builtin_types.cpp \ 20 builtin_variables.cpp \ 21 glsl_lexer.cpp \ 22 glsl_optimizer.cpp \ 23 glsl_parser.cpp \ 24 glsl_parser_extras.cpp \ 25 glsl_symbol_table.cpp \ 26 glsl_types.cpp \ 27 hir_field_selection.cpp \ 28 ir.cpp \ 29 ir_basic_block.cpp \ 30 ir_builder.cpp \ 31 ir_clone.cpp \ 32 ir_constant_expression.cpp \ 33 ir_equals.cpp \ 34 ir_expression_flattening.cpp \ 35 ir_function.cpp \ 36 ir_function_can_inline.cpp \ 37 ir_function_detect_recursion.cpp \ 38 ir_hierarchical_visitor.cpp \ 39 ir_hv_accept.cpp \ 40 ir_import_prototypes.cpp \ 41 ir_print_glsl_visitor.cpp \ 42 ir_print_metal_visitor.cpp \ 43 ir_print_visitor.cpp \ 44 ir_rvalue_visitor.cpp \ 45 ir_stats.cpp \ 46 ir_unused_structs.cpp \ 47 ir_validate.cpp \ 48 ir_variable_refcount.cpp \ 49 link_atomics.cpp \ 50 linker.cpp \ 51 link_functions.cpp \ 52 link_interface_blocks.cpp \ 53 link_uniform_block_active_visitor.cpp \ 54 link_uniform_blocks.cpp \ 55 link_uniform_initializers.cpp \ 56 link_uniforms.cpp \ 57 link_varyings.cpp \ 58 loop_analysis.cpp \ 59 loop_controls.cpp \ 60 loop_unroll.cpp \ 61 lower_clip_distance.cpp \ 62 lower_discard.cpp \ 63 lower_discard_flow.cpp \ 64 lower_if_to_cond_assign.cpp \ 65 lower_instructions.cpp \ 66 lower_jumps.cpp \ 67 lower_mat_op_to_vec.cpp \ 68 lower_named_interface_blocks.cpp \ 69 lower_noise.cpp \ 70 lower_offset_array.cpp \ 71 lower_output_reads.cpp \ 72 lower_packed_varyings.cpp \ 73 lower_packing_builtins.cpp \ 74 lower_ubo_reference.cpp \ 75 lower_variable_index_to_cond_assign.cpp \ 76 lower_vec_index_to_cond_assign.cpp \ 77 lower_vec_index_to_swizzle.cpp \ 78 lower_vector.cpp \ 79 lower_vector_insert.cpp \ 80 lower_vertex_id.cpp \ 81 opt_algebraic.cpp \ 82 opt_array_splitting.cpp \ 83 opt_constant_folding.cpp \ 84 opt_constant_propagation.cpp \ 85 opt_constant_variable.cpp \ 86 opt_copy_propagation.cpp \ 87 opt_copy_propagation_elements.cpp \ 88 opt_cse.cpp \ 89 opt_dead_builtin_variables.cpp \ 90 opt_dead_builtin_varyings.cpp \ 91 opt_dead_code.cpp \ 92 opt_dead_code_local.cpp \ 93 opt_dead_functions.cpp \ 94 opt_flatten_nested_if_blocks.cpp \ 95 opt_flip_matrices.cpp \ 96 opt_function_inlining.cpp \ 97 opt_if_simplification.cpp \ 98 opt_minmax.cpp \ 99 opt_noop_swizzle.cpp \ 100 opt_rebalance_tree.cpp \ 101 opt_redundant_jumps.cpp \ 102 opt_structure_splitting.cpp \ 103 opt_swizzle_swizzle.cpp \ 104 opt_tree_grafting.cpp \ 105 opt_vectorize.cpp \ 106 s_expression.cpp \ 107 standalone_scaffolding.cpp \ 108 strtod.c \ 109 glcpp/glcpp-lex.c \ 110 glcpp/glcpp-parse.c \ 111 glcpp/pp.c \ 112 ../mesa/main/imports.c \ 113 ../mesa/program/prog_hash_table.c \ 114 ../mesa/program/symbol_table.c \ 115 ../util/hash_table.c \ 116 ../util/ralloc.c 117 118 119OBJS1 = $(SRC:.cpp=.o) 120OBJS = $(OBJS1:.c=.o) 121 122LIBNAME = libglslopt.a 123 124.PHONY: clean all 125 126all: $(OBJS) 127 ar cr $(LIBNAME) $(OBJS) 128 ranlib $(LIBNAME) 129 130clean: 131 rm -f $(OBJS) $(LIBNAME) 132