grub2: bring back build of aros-side grub2 tools
[AROS.git] / workbench / libs / mesa / src / aros / mesa3dgl / mmakefile.src
blobafa8d1d7ea89c58a354e6e6fc3d8824f4b1e79a8
1 #   $Id$
3 #   Generate libGL.a
6 include $(SRCDIR)/config/aros.cfg
8 include $(SRCDIR)/$(CURDIR)/../../mesa/sources.mak
9 include $(SRCDIR)/$(CURDIR)/../../mapi/glapi/sources.mak
10 include $(SRCDIR)/$(CURDIR)/../../mapi/mapi/sources.mak
12 #MM- workbench-libs-complete : workbench-libs-mesa
14 #MM workbench-libs-mesa : includes linklibs-galliumauxiliary workbench-libs-gallium-linklib
16 SHARED_LIB_SOURCES = \
17             aros/emul_arosc \
18             aros/tls \
20 MESA3DGL_SOURCES = \
21             aros/mesa3dgl/mesa3dgl_support \
22             aros/mesa3dgl/mesa3dgl_gallium \
23             aros/mesa3dgl/mesa3dgl_init \
24             aros/mesa3dgl/mesa3dgl_getopenglstatetrackerapi \
25             aros/mesa3dgl/mesa3dgl_glacreatecontext \
26             aros/mesa3dgl/mesa3dgl_gladestroycontext \
27             aros/mesa3dgl/mesa3dgl_glagetconfig \
28             aros/mesa3dgl/mesa3dgl_glagetcurrentcontext \
29             aros/mesa3dgl/mesa3dgl_glagetprocaddress \
30             aros/mesa3dgl/mesa3dgl_glamakecurrent \
31             aros/mesa3dgl/mesa3dgl_glasetrast \
32             aros/mesa3dgl/mesa3dgl_glaswapbuffers \
34 GLSL_LIBGLCPP_SOURCES = \
35             glcpp/glcpp-lex.c \
36             glcpp/glcpp-parse.c \
37             glcpp/pp.c
39 GLSL_CXX_SOURCES = \
40             ast_expr.cpp \
41             ast_function.cpp \
42             ast_to_hir.cpp \
43             ast_type.cpp \
44             glsl_lexer.cpp \
45             glsl_parser.cpp \
46             glsl_parser_extras.cpp \
47             glsl_types.cpp \
48             glsl_symbol_table.cpp \
49             hir_field_selection.cpp \
50             ir_basic_block.cpp \
51             ir_clone.cpp \
52             ir_constant_expression.cpp \
53             ir.cpp \
54             ir_expression_flattening.cpp \
55             ir_function_can_inline.cpp \
56             ir_function_detect_recursion.cpp \
57             ir_function.cpp \
58             ir_hierarchical_visitor.cpp \
59             ir_hv_accept.cpp \
60             ir_import_prototypes.cpp \
61             ir_print_visitor.cpp \
62             ir_reader.cpp \
63             ir_rvalue_visitor.cpp \
64             ir_set_program_inouts.cpp \
65             ir_validate.cpp \
66             ir_variable.cpp \
67             ir_variable_refcount.cpp \
68             linker.cpp \
69             link_functions.cpp \
70             loop_analysis.cpp \
71             loop_controls.cpp \
72             loop_unroll.cpp \
73             lower_discard.cpp \
74             lower_if_to_cond_assign.cpp \
75             lower_instructions.cpp \
76             lower_jumps.cpp \
77             lower_mat_op_to_vec.cpp \
78             lower_noise.cpp \
79             lower_texture_projection.cpp \
80             lower_variable_index_to_cond_assign.cpp \
81             lower_vec_index_to_cond_assign.cpp \
82             lower_vec_index_to_swizzle.cpp \
83             lower_vector.cpp \
84             opt_algebraic.cpp \
85             opt_constant_folding.cpp \
86             opt_constant_propagation.cpp \
87             opt_constant_variable.cpp \
88             opt_copy_propagation.cpp \
89             opt_copy_propagation_elements.cpp \
90             opt_dead_code.cpp \
91             opt_dead_code_local.cpp \
92             opt_dead_functions.cpp \
93             opt_discard_simplification.cpp \
94             opt_function_inlining.cpp \
95             opt_if_simplification.cpp \
96             opt_noop_swizzle.cpp \
97             opt_redundant_jumps.cpp \
98             opt_structure_splitting.cpp \
99             opt_swizzle_swizzle.cpp \
100             opt_tree_grafting.cpp \
101             s_expression.cpp \
103 GLSL_GENERATED_CXX_SOURCES = \
104             builtin_function.cpp \
106 GLSL_C_SOURCES = \
107             $(GLSL_LIBGLCPP_SOURCES) \
108             strtod.c \
109             ralloc.c \
111 USER_INCLUDES := \
112             -I$(AROS_DEVELOPMENT)/include/gallium \
113             -I$(SRCDIR)/$(CURDIR)/../../../include \
114             -I$(SRCDIR)/$(CURDIR)/../../../include/GL \
115             -I$(SRCDIR)/$(CURDIR)/../../mesa \
116             -I$(SRCDIR)/$(CURDIR)/../../mesa/main \
117             -I$(SRCDIR)/$(CURDIR)/../../mapi \
118             -I$(SRCDIR)/$(CURDIR)/../../glsl \
119             -I$(SRCDIR)/$(CURDIR)/../../talloc \
120             -I$(SRCDIR)/$(CURDIR)/../../gallium/include \
121             -I$(SRCDIR)/$(CURDIR)/../../aros \
122             -I$(SRCDIR)/$(CURDIR)/../.. \
124 NOWARN_FLAGS := $(NOWARN_UNUSED_CONST_VARIABLE) $(NOWARN_STRICT_ALIASING) \
125                 $(NOWARN_VOLATILE_REGISTER_VAR)
126 GLCOMMON_FLAGS := $(NOWARN_FLAGS) \
127                 -ffast-math -DMAPI_MODE_UTIL -DFEATURE_GL=1 \
128                 -DMAPI_ABI_HEADER=\"glapi/glapi_mapi_tmp.h\"
129 USER_CFLAGS := $(GLCOMMON_FLAGS)
130 USER_CXXFLAGS := -fno-rtti -fno-exceptions $(GLCOMMON_FLAGS)
131 USER_LDFLAGS := -static-libstdc++
133 MESAGL_CORE_SOURCES = \
134             $(addprefix mesa/, $(MESA_GALLIUM_SOURCES:.c=)) \
135             $(addprefix mapi/mapi/, $(MAPI_UTIL_SOURCES:.c=)) \
136             $(addprefix mapi/glapi/, $(GLAPI_SOURCES:.c=)) \
137             $(addprefix glsl/, $(GLSL_C_SOURCES:.c=)) \
138             
139 # Compilation of C++ GLSL compiler
141 CXX_SOURCES := \
142     $(addprefix ../../mesa/, $(MESA_CXX_SOURCES:.cpp=)) \
143     $(addprefix ../../glsl/, $(GLSL_CXX_SOURCES:.cpp=)) \
144     $(addprefix ../../glsl/, $(GLSL_GENERATED_CXX_SOURCES:.cpp=)) \
145     ../../aros/emul_cpp \
147 LIBRARY_SOURCES = \
148             $(addprefix ../../, $(MESAGL_CORE_SOURCES)) \
149             $(addprefix ../../, $(MESA3DGL_SOURCES)) \
150             $(addprefix ../../, $(SHARED_LIB_SOURCES))
152 # #MM- core-linklibs : linklibs-mesa
154 %build_module_library mmake=workbench-libs-mesa \
155     modname=mesa3dgl modtype=library conffile=$(SRCDIR)/workbench/libs/gl/gl.conf \
156     files="$(LIBRARY_SOURCES)" cxxfiles="$(CXX_SOURCES)" \
157     uselibs="galliumauxiliary gallium stdcio stdc"
159 # NOTE: Both files have been generated and added to AROS repository. Once all
160 # build machines support python 2.5 with libxml2, these targets can be enabled
162 MESA_MAIN := $(SRCDIR)/$(CURDIR)/../../mesa/main
165 workbench-libs-mesa-generated : $(MESA_MAIN)/api_exec_es1.c $(MESA_MAIN)/api_exec_es2.c
167 $(MESA_MAIN)/api_exec_es1.c :
168         @$(PYTHON) $(MESA_MAIN)/es_generator.py -S $(MESA_MAIN)/APIspec.xml -V GLES1.1 > $@
170 $(SRCDIR)/$(CURDIR)/../../mesa/main/api_exec_es2.c :
171         @$(PYTHON) $(MESA_MAIN)/es_generator.py -S $(MESA_MAIN)/APIspec.xml -V GLES2.0 > $@
173 %common