Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

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