Rev 4632 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4632 | Rev 4866 | ||
---|---|---|---|
1 | CC = gcc |
- | |
2 | 1 | SRC_DIR:=$(SDK_DIR)/sources |
|
3 | SRC_DIR:=$(SDK_DIR)/sources |
2 | MESA_SRC:= $(SRC_DIR)/Mesa/src |
4 | MESA_SRC:= $(SRC_DIR)/Mesa/src |
3 | |
5 | 4 | CFLAGS_OPT = -U_Win32 -U_WIN32 -U__MINGW32__ -UWIN32 -U_MSC_VER -Os |
|
6 | CFLAGS_OPT = -U_Win32 -U_WIN32 -U__MINGW32__ -UWIN32 -U_MSC_VER -Os |
5 | CFLAGS_OPT+= -fomit-frame-pointer -mno-ms-bitfields |
7 | CFLAGS_OPT+= -fomit-frame-pointer -mno-ms-bitfields |
6 | CFLAGS = -c $(CFLAGS_OPT) |
8 | CFLAGS = -c $(CFLAGS_OPT) |
7 | |
9 | 8 | INC_MESA:= -I$(SRC_DIR)/newlib/include -I$(SRC_DIR)/Mesa/include |
|
10 | INC_MESA:= -I$(SRC_DIR)/newlib/include -I$(SRC_DIR)/Mesa/include |
9 | INC_MESA+= -I./src -I$(MESA_SRC)/glsl -I$(MESA_SRC)/mesa -I$(MESA_SRC)/mapi |
11 | INC_MESA+= -I./src -I$(MESA_SRC)/glsl -I$(MESA_SRC)/mesa -I$(MESA_SRC)/mapi |
10 | |
12 | 11 | MESA_DEFS= -DMESA_DLL -DBUILD_GL32 -DMAPI_MODE_UTIL -DMAPI_TABLE_NUM_STATIC=87 -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_SSE_ASM -DMAPI_TABLE_NUM_DYNAMIC=256 |
|
13 | MESA_DEFS= -DMESA_DLL -DBUILD_GL32 -DMAPI_MODE_UTIL -DMAPI_TABLE_NUM_STATIC=87 -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_SSE_ASM -DMAPI_TABLE_NUM_DYNAMIC=256 |
12 | MESA_DEFS+= -DPACKAGE_NAME=\"Mesa\" -DPACKAGE_VERSION=\"9.2.5\" -DPACKAGE_BUGREPORT=\"https://bugs.freedesktop.org/enter_bug.cgi\?product=Mesa\" |
14 | MESA_DEFS+= -DPACKAGE_NAME=\"Mesa\" -DPACKAGE_VERSION=\"9.2.5\" -DPACKAGE_BUGREPORT=\"https://bugs.freedesktop.org/enter_bug.cgi\?product=Mesa\" |
13 | MESA_DEFS+= -DPACKAGE_URL=\"\" -DPACKAGE=\"mesa\" -DVERSION=\"9.2.5\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 |
15 | MESA_DEFS+= -DPACKAGE_URL=\"\" -DPACKAGE=\"mesa\" -DVERSION=\"9.2.5\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 |
14 | MESA_DEFS+= -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 |
16 | MESA_DEFS+= -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 |
15 | |
17 | 16 | GLSL_SRC = \ |
|
18 | GLSL_SRC = \ |
17 | glcpp/glcpp-lex.c \ |
19 | glcpp/glcpp-lex.c \ |
18 | glcpp/glcpp-parse.c \ |
20 | glcpp/glcpp-parse.c \ |
19 | glcpp/pp.c \ |
21 | glcpp/pp.c \ |
20 | ast_array_index.cpp \ |
22 | ast_array_index.cpp \ |
21 | ast_expr.cpp \ |
23 | ast_expr.cpp \ |
22 | ast_function.cpp \ |
24 | ast_function.cpp \ |
23 | ast_to_hir.cpp \ |
25 | ast_to_hir.cpp \ |
24 | ast_type.cpp \ |
26 | ast_type.cpp \ |
25 | builtin_function.cpp \ |
27 | builtin_function.cpp \ |
26 | builtin_types.cpp \ |
28 | builtin_types.cpp \ |
27 | builtin_variables.cpp \ |
29 | builtin_variables.cpp \ |
28 | glsl_lexer.cpp \ |
30 | glsl_lexer.cpp \ |
29 | glsl_parser.cpp \ |
31 | glsl_parser.cpp \ |
30 | glsl_parser_extras.cpp \ |
32 | glsl_parser_extras.cpp \ |
31 | glsl_symbol_table.cpp \ |
33 | glsl_symbol_table.cpp \ |
32 | glsl_types.cpp \ |
34 | glsl_types.cpp \ |
33 | hir_field_selection.cpp \ |
35 | hir_field_selection.cpp \ |
34 | ir.cpp \ |
36 | ir.cpp \ |
35 | ir_basic_block.cpp \ |
37 | ir_basic_block.cpp \ |
36 | ir_builder.cpp \ |
38 | ir_builder.cpp \ |
37 | ir_clone.cpp \ |
39 | ir_clone.cpp \ |
38 | ir_constant_expression.cpp \ |
40 | ir_constant_expression.cpp \ |
39 | ir_expression_flattening.cpp \ |
41 | ir_expression_flattening.cpp \ |
40 | ir_function.cpp \ |
42 | ir_function.cpp \ |
41 | ir_function_can_inline.cpp \ |
43 | ir_function_can_inline.cpp \ |
42 | ir_function_detect_recursion.cpp\ |
44 | ir_function_detect_recursion.cpp\ |
43 | ir_hierarchical_visitor.cpp \ |
45 | ir_hierarchical_visitor.cpp \ |
44 | ir_hv_accept.cpp \ |
46 | ir_hv_accept.cpp \ |
45 | ir_import_prototypes.cpp \ |
47 | ir_import_prototypes.cpp \ |
46 | ir_print_visitor.cpp \ |
48 | ir_print_visitor.cpp \ |
47 | ir_reader.cpp \ |
49 | ir_reader.cpp \ |
48 | ir_rvalue_visitor.cpp \ |
50 | ir_rvalue_visitor.cpp \ |
49 | ir_set_program_inouts.cpp \ |
51 | ir_set_program_inouts.cpp \ |
50 | ir_validate.cpp \ |
52 | ir_validate.cpp \ |
51 | ir_variable_refcount.cpp \ |
53 | ir_variable_refcount.cpp \ |
52 | link_functions.cpp \ |
54 | link_functions.cpp \ |
53 | link_interface_blocks.cpp \ |
55 | link_interface_blocks.cpp \ |
54 | link_uniform_block_active_visitor.cpp \ |
56 | link_uniform_block_active_visitor.cpp \ |
55 | link_uniform_blocks.cpp \ |
57 | link_uniform_blocks.cpp \ |
56 | link_uniform_initializers.cpp \ |
58 | link_uniform_initializers.cpp \ |
57 | link_uniforms.cpp \ |
59 | link_uniforms.cpp \ |
58 | link_varyings.cpp \ |
60 | link_varyings.cpp \ |
59 | linker.cpp \ |
61 | linker.cpp \ |
60 | loop_analysis.cpp \ |
62 | loop_analysis.cpp \ |
61 | loop_controls.cpp \ |
63 | loop_controls.cpp \ |
62 | loop_unroll.cpp \ |
64 | loop_unroll.cpp \ |
63 | lower_clip_distance.cpp \ |
65 | lower_clip_distance.cpp \ |
64 | lower_discard.cpp \ |
66 | lower_discard.cpp \ |
65 | lower_discard_flow.cpp \ |
67 | lower_discard_flow.cpp \ |
66 | lower_if_to_cond_assign.cpp \ |
68 | lower_if_to_cond_assign.cpp \ |
67 | lower_instructions.cpp \ |
69 | lower_instructions.cpp \ |
68 | lower_jumps.cpp \ |
70 | lower_jumps.cpp \ |
69 | lower_mat_op_to_vec.cpp \ |
71 | lower_mat_op_to_vec.cpp \ |
70 | lower_named_interface_blocks.cpp\ |
72 | lower_named_interface_blocks.cpp\ |
71 | lower_noise.cpp \ |
73 | lower_noise.cpp \ |
72 | lower_output_reads.cpp \ |
74 | lower_output_reads.cpp \ |
73 | lower_packed_varyings.cpp \ |
75 | lower_packed_varyings.cpp \ |
74 | lower_packing_builtins.cpp \ |
76 | lower_packing_builtins.cpp \ |
75 | lower_texture_projection.cpp \ |
77 | lower_texture_projection.cpp \ |
76 | lower_ubo_reference.cpp \ |
78 | lower_ubo_reference.cpp \ |
77 | lower_variable_index_to_cond_assign.cpp \ |
79 | lower_variable_index_to_cond_assign.cpp \ |
78 | lower_vec_index_to_cond_assign.cpp \ |
80 | lower_vec_index_to_cond_assign.cpp \ |
79 | lower_vec_index_to_swizzle.cpp \ |
81 | lower_vec_index_to_swizzle.cpp \ |
80 | lower_vector.cpp \ |
82 | lower_vector.cpp \ |
81 | lower_vector_insert.cpp \ |
83 | lower_vector_insert.cpp \ |
82 | opt_algebraic.cpp \ |
84 | opt_algebraic.cpp \ |
83 | opt_array_splitting.cpp \ |
85 | opt_array_splitting.cpp \ |
84 | opt_constant_folding.cpp \ |
86 | opt_constant_folding.cpp \ |
85 | opt_constant_propagation.cpp \ |
87 | opt_constant_propagation.cpp \ |
86 | opt_constant_variable.cpp \ |
88 | opt_constant_variable.cpp \ |
87 | opt_copy_propagation.cpp \ |
89 | opt_copy_propagation.cpp \ |
88 | opt_copy_propagation_elements.cpp \ |
90 | opt_copy_propagation_elements.cpp \ |
89 | opt_dead_builtin_varyings.cpp \ |
91 | opt_dead_builtin_varyings.cpp \ |
90 | opt_dead_code.cpp \ |
92 | opt_dead_code.cpp \ |
91 | opt_dead_code_local.cpp \ |
93 | opt_dead_code_local.cpp \ |
92 | opt_dead_functions.cpp \ |
94 | opt_dead_functions.cpp \ |
93 | opt_flatten_nested_if_blocks.cpp\ |
95 | opt_flatten_nested_if_blocks.cpp\ |
94 | opt_flip_matrices.cpp \ |
96 | opt_flip_matrices.cpp \ |
95 | opt_function_inlining.cpp \ |
97 | opt_function_inlining.cpp \ |
96 | opt_if_simplification.cpp \ |
98 | opt_if_simplification.cpp \ |
97 | opt_noop_swizzle.cpp \ |
99 | opt_noop_swizzle.cpp \ |
98 | opt_redundant_jumps.cpp \ |
100 | opt_redundant_jumps.cpp \ |
99 | opt_structure_splitting.cpp \ |
101 | opt_structure_splitting.cpp \ |
100 | opt_swizzle_swizzle.cpp \ |
102 | opt_swizzle_swizzle.cpp \ |
101 | opt_tree_grafting.cpp \ |
103 | opt_tree_grafting.cpp \ |
102 | ralloc.c \ |
104 | ralloc.c \ |
103 | s_expression.cpp \ |
105 | s_expression.cpp \ |
104 | strtod.c \ |
106 | strtod.c \ |
105 | $(NULL) |
107 | $(NULL) |
106 | |
108 | 107 | ||
109 | 108 | GLSL_OBJS = $(patsubst %.cpp, %.o, $(patsubst %.c, %.o, $(GLSL_SRC))) |
|
110 | GLSL_OBJS = $(patsubst %.cpp, %.o, $(patsubst %.c, %.o, $(GLSL_SRC))) |
109 | |
111 | 110 | # targets |
|
112 | # targets |
111 | |
113 | 112 | all: libglsl.a |
|
114 | all: libglsl.a |
113 | |
115 | 114 | libglsl.a : $(GLSL_OBJS) Makefile |
|
116 | libglsl.a : $(GLSL_OBJS) Makefile |
115 | $(AR) crs libglsl.a $(GLSL_OBJS) |
117 | ar cvrs libglsl.a $(GLSL_OBJS) |
116 | mv -f libglsl.a $(SDK_DIR)/lib |
118 | mv -f libglsl.a $(SDK_DIR)/lib |
117 | |
119 | 118 | %.o : %.c Makefile |
|
120 | %.o : %.c Makefile |
119 | $(CC) $(CFLAGS) -std=c99 $(MESA_DEFS) $(INC_MESA) -o $@ $< |
121 | $(CC) $(CFLAGS) -std=c99 $(MESA_DEFS) $(INC_MESA) -o $@ $< |
120 | |
122 | 121 | %.o : %.cpp Makefile |
|
123 | %.o : %.cpp Makefile |
122 | $(CC) $(CFLAGS) $(MESA_DEFS) $(INC_MESA) -o $@ $<> |
124 | $(CC) $(CFLAGS) $(MESA_DEFS) $(INC_MESA) -o $@ $<> |
123 | |
125 | 124 | %.o> |
|
126 | %.o> |
- |