6 include $(TOP)/config/make.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-$(AROS_TARGET_TOOLCHAIN)
13 #MM- workbench-libs-mesa-yes : workbench-libs-mesa
15 #MM workbench-libs-mesa : includes linklibs-galliumauxiliary workbench-libs-gallium-linklib
17 SHARED_LIB_SOURCES = \
22 aros/mesa3dgl/mesa3dgl_support \
23 aros/mesa3dgl/mesa3dgl_gallium \
24 aros/mesa3dgl/mesa3dgl_init \
25 aros/mesa3dgl/mesa3dgl_getopenglstatetrackerapi \
26 aros/mesa3dgl/mesa3dgl_glacreatecontext \
27 aros/mesa3dgl/mesa3dgl_gladestroycontext \
28 aros/mesa3dgl/mesa3dgl_glagetconfig \
29 aros/mesa3dgl/mesa3dgl_glagetcurrentcontext \
30 aros/mesa3dgl/mesa3dgl_glagetprocaddress \
31 aros/mesa3dgl/mesa3dgl_glamakecurrent \
32 aros/mesa3dgl/mesa3dgl_glasetrast \
33 aros/mesa3dgl/mesa3dgl_glaswapbuffers \
35 GLSL_LIBGLCPP_SOURCES = \
47 glsl_parser_extras.cpp \
49 glsl_symbol_table.cpp \
50 hir_field_selection.cpp \
53 ir_constant_expression.cpp \
55 ir_expression_flattening.cpp \
56 ir_function_can_inline.cpp \
57 ir_function_detect_recursion.cpp \
59 ir_hierarchical_visitor.cpp \
61 ir_import_prototypes.cpp \
62 ir_print_visitor.cpp \
64 ir_rvalue_visitor.cpp \
65 ir_set_program_inouts.cpp \
68 ir_variable_refcount.cpp \
75 lower_if_to_cond_assign.cpp \
76 lower_instructions.cpp \
78 lower_mat_op_to_vec.cpp \
80 lower_texture_projection.cpp \
81 lower_variable_index_to_cond_assign.cpp \
82 lower_vec_index_to_cond_assign.cpp \
83 lower_vec_index_to_swizzle.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 \
92 opt_dead_code_local.cpp \
93 opt_dead_functions.cpp \
94 opt_discard_simplification.cpp \
95 opt_function_inlining.cpp \
96 opt_if_simplification.cpp \
97 opt_noop_swizzle.cpp \
98 opt_redundant_jumps.cpp \
99 opt_structure_splitting.cpp \
100 opt_swizzle_swizzle.cpp \
101 opt_tree_grafting.cpp \
104 GLSL_GENERATED_CXX_SOURCES = \
105 builtin_function.cpp \
108 $(GLSL_LIBGLCPP_SOURCES) \
113 -I$(AROS_DEVELOPMENT)/include/gallium \
114 -I$(SRCDIR)/$(CURDIR)/../../../include \
115 -I$(SRCDIR)/$(CURDIR)/../../../include/GL \
116 -I$(SRCDIR)/$(CURDIR)/../../mesa \
117 -I$(SRCDIR)/$(CURDIR)/../../mesa/main \
118 -I$(SRCDIR)/$(CURDIR)/../../mapi \
119 -I$(SRCDIR)/$(CURDIR)/../../glsl \
120 -I$(SRCDIR)/$(CURDIR)/../../talloc \
121 -I$(SRCDIR)/$(CURDIR)/../../gallium/include \
122 -I$(SRCDIR)/$(CURDIR)/../../aros \
123 -I$(SRCDIR)/$(CURDIR)/../.. \
125 USER_CFLAGS := -ffast-math -DMAPI_MODE_UTIL -DFEATURE_GL=1 \
126 -DMAPI_ABI_HEADER=\"glapi/glapi_mapi_tmp.h\"
128 USER_CXXFLAGS := -fno-rtti -fno-exceptions
130 MESAGL_CORE_SOURCES = \
131 $(addprefix mesa/, $(MESA_GALLIUM_SOURCES:.c=)) \
132 $(addprefix mapi/mapi/, $(MAPI_UTIL_SOURCES:.c=)) \
133 $(addprefix mapi/glapi/, $(GLAPI_SOURCES:.c=)) \
134 $(addprefix glsl/, $(GLSL_C_SOURCES:.c=)) \
136 # Compilation of C++ GLSL compiler
139 $(addprefix ../../mesa/, $(MESA_CXX_SOURCES:.cpp=)) \
140 $(addprefix ../../glsl/, $(GLSL_CXX_SOURCES:.cpp=)) \
141 $(addprefix ../../glsl/, $(GLSL_GENERATED_CXX_SOURCES:.cpp=)) \
142 ../../aros/emul_cpp \
145 $(addprefix ../../, $(MESAGL_CORE_SOURCES)) \
146 $(addprefix ../../, $(MESA3DGL_SOURCES)) \
147 $(addprefix ../../, $(SHARED_LIB_SOURCES))
149 # #MM- core-linklibs : linklibs-mesa
151 %build_module_library mmake=workbench-libs-mesa \
152 modname=mesa3dgl modtype=library conffile=$(SRCDIR)/workbench/libs/gl/gl.conf \
153 files="$(LIBRARY_SOURCES)" cxxfiles="$(CXX_SOURCES)" \
154 uselibs="galliumauxiliary gallium stdcio stdc"
156 # NOTE: Both files have been generated and added to AROS repository. Once all
157 # build machines support python 2.5 with libxml2, these targets can be enabled
159 MESA_MAIN := $(SRCDIR)/$(CURDIR)/../../mesa/main
162 workbench-libs-mesa-generated : $(MESA_MAIN)/api_exec_es1.c $(MESA_MAIN)/api_exec_es2.c
164 $(MESA_MAIN)/api_exec_es1.c :
165 @$(PYTHON) $(MESA_MAIN)/es_generator.py -S $(MESA_MAIN)/APIspec.xml -V GLES1.1 > $@
167 $(SRCDIR)/$(CURDIR)/../../mesa/main/api_exec_es2.c :
168 @$(PYTHON) $(MESA_MAIN)/es_generator.py -S $(MESA_MAIN)/APIspec.xml -V GLES2.0 > $@