finish transitioning from arosmesa -> mesa3dgl.library
[AROS.git] / workbench / libs / mesa / src / aros / arosmesa / mmakefile.src
blobe19ef6bbbe2653de24bbcf6d285293379e831906
1 #   $Id$
3 #   Generate libGL.a
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 = \
18             aros/emul_arosc \
19             aros/tls \
21 MESA3DGL_SOURCES = \
22             aros/arosmesa/mesa3dgl_support \
23             aros/arosmesa/mesa3dgl_gallium \
24             aros/arosmesa/mesa3dgl_init \
25             aros/arosmesa/mesa3dgl_getopenglstatetrackerapi \
26             aros/arosmesa/mesa3dgl_glacreatecontext \
27             aros/arosmesa/mesa3dgl_gladestroycontext \
28             aros/arosmesa/mesa3dgl_glagetconfig \
29             aros/arosmesa/mesa3dgl_glagetcurrentcontext \
30             aros/arosmesa/mesa3dgl_glagetprocaddress \
31             aros/arosmesa/mesa3dgl_glamakecurrent \
32             aros/arosmesa/mesa3dgl_glasetrast \
33             aros/arosmesa/mesa3dgl_glaswapbuffers \
35 GLSL_LIBGLCPP_SOURCES = \
36             glcpp/glcpp-lex.c \
37             glcpp/glcpp-parse.c \
38             glcpp/pp.c
40 GLSL_CXX_SOURCES = \
41             ast_expr.cpp \
42             ast_function.cpp \
43             ast_to_hir.cpp \
44             ast_type.cpp \
45             glsl_lexer.cpp \
46             glsl_parser.cpp \
47             glsl_parser_extras.cpp \
48             glsl_types.cpp \
49             glsl_symbol_table.cpp \
50             hir_field_selection.cpp \
51             ir_basic_block.cpp \
52             ir_clone.cpp \
53             ir_constant_expression.cpp \
54             ir.cpp \
55             ir_expression_flattening.cpp \
56             ir_function_can_inline.cpp \
57             ir_function_detect_recursion.cpp \
58             ir_function.cpp \
59             ir_hierarchical_visitor.cpp \
60             ir_hv_accept.cpp \
61             ir_import_prototypes.cpp \
62             ir_print_visitor.cpp \
63             ir_reader.cpp \
64             ir_rvalue_visitor.cpp \
65             ir_set_program_inouts.cpp \
66             ir_validate.cpp \
67             ir_variable.cpp \
68             ir_variable_refcount.cpp \
69             linker.cpp \
70             link_functions.cpp \
71             loop_analysis.cpp \
72             loop_controls.cpp \
73             loop_unroll.cpp \
74             lower_discard.cpp \
75             lower_if_to_cond_assign.cpp \
76             lower_instructions.cpp \
77             lower_jumps.cpp \
78             lower_mat_op_to_vec.cpp \
79             lower_noise.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 \
84             lower_vector.cpp \
85             opt_algebraic.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_code.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 \
102             s_expression.cpp \
104 GLSL_GENERATED_CXX_SOURCES = \
105             builtin_function.cpp \
107 GLSL_C_SOURCES = \
108             $(GLSL_LIBGLCPP_SOURCES) \
109             strtod.c \
110             ralloc.c \
112 USER_INCLUDES := \
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 MESAGL_CORE_SOURCES = \
129             $(addprefix mesa/, $(MESA_GALLIUM_SOURCES:.c=)) \
130             $(addprefix mapi/mapi/, $(MAPI_UTIL_SOURCES:.c=)) \
131             $(addprefix mapi/glapi/, $(GLAPI_SOURCES:.c=)) \
132             $(addprefix glsl/, $(GLSL_C_SOURCES:.c=)) \
133             
134 # Compilation of C++ GLSL compiler
136 CXX_SOURCES := \
137     $(addprefix ../../mesa/, $(MESA_CXX_SOURCES:.cpp=)) \
138     $(addprefix ../../glsl/, $(GLSL_CXX_SOURCES:.cpp=)) \
139     $(addprefix ../../glsl/, $(GLSL_GENERATED_CXX_SOURCES:.cpp=)) \
140     ../../aros/emul_cpp \
142 LIBRARY_SOURCES = \
143             $(addprefix ../../, $(MESAGL_CORE_SOURCES)) \
144             $(addprefix ../../, $(MESA3DGL_SOURCES)) \
145             $(addprefix ../../, $(SHARED_LIB_SOURCES))
147 # #MM- core-linklibs : linklibs-mesa
149 %build_module_library mmake=workbench-libs-mesa \
150     modname=mesa3dgl modtype=library conffile=$(SRCDIR)/workbench/libs/gl/gl.conf \
151     files="$(LIBRARY_SOURCES)" cxxfiles="$(CXX_SOURCES)" \
152     uselibs="galliumauxiliary gallium stdcio stdc"
154 # NOTE: Both files have been generated and added to AROS repository. Once all
155 # build machines support python 2.5 with libxml2, these targets can be enabled
157 MESA_MAIN := $(SRCDIR)/$(CURDIR)/../../mesa/main
160 workbench-libs-mesa-generated : $(MESA_MAIN)/api_exec_es1.c $(MESA_MAIN)/api_exec_es2.c
162 $(MESA_MAIN)/api_exec_es1.c :
163         @$(PYTHON) $(MESA_MAIN)/es_generator.py -S $(MESA_MAIN)/APIspec.xml -V GLES1.1 > $@
165 $(SRCDIR)/$(CURDIR)/../../mesa/main/api_exec_es2.c :
166         @$(PYTHON) $(MESA_MAIN)/es_generator.py -S $(MESA_MAIN)/APIspec.xml -V GLES2.0 > $@
168 %common