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 = \
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 = \
46 glsl_parser_extras.cpp \
48 glsl_symbol_table.cpp \
49 hir_field_selection.cpp \
52 ir_constant_expression.cpp \
54 ir_expression_flattening.cpp \
55 ir_function_can_inline.cpp \
56 ir_function_detect_recursion.cpp \
58 ir_hierarchical_visitor.cpp \
60 ir_import_prototypes.cpp \
61 ir_print_visitor.cpp \
63 ir_rvalue_visitor.cpp \
64 ir_set_program_inouts.cpp \
67 ir_variable_refcount.cpp \
74 lower_if_to_cond_assign.cpp \
75 lower_instructions.cpp \
77 lower_mat_op_to_vec.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 \
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 \
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 \
103 GLSL_GENERATED_CXX_SOURCES = \
104 builtin_function.cpp \
107 $(GLSL_LIBGLCPP_SOURCES) \
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=)) \
139 # Compilation of C++ GLSL compiler
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 \
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 > $@