revert between 56095 -> 55830 in arch
[AROS.git] / workbench / libs / mesa / src / mapi / glapi / gen / Makefile
blob40d25b121ca9028d0b525b90de9f0b3065190e40
1 # This file isn't used during a normal compilation since we don't want to
2 # require Python in order to compile Mesa.
3 # Instead, when the Mesa developers update/change the API interface it's
4 # up to him/her to re-run this makefile and check in the newly generated files.
7 TOP = ../../../..
8 #include $(TOP)/configs/current
9 PYTHON2 = python
10 PYTHON_FLAGS = -t -O -O
12 MESA_DIR = $(TOP)/src/mesa
13 MESA_GLAPI_DIR = $(TOP)/src/mapi/glapi
14 MESA_MAPI_DIR = $(TOP)/src/mapi/mapi
15 MESA_GLX_DIR = $(TOP)/src/glx
17 MESA_GLAPI_OUTPUTS = \
18 $(MESA_GLAPI_DIR)/glapi_mapi_tmp.h \
19 $(MESA_GLAPI_DIR)/glprocs.h \
20 $(MESA_GLAPI_DIR)/glapitemp.h \
21 $(MESA_GLAPI_DIR)/glapitable.h \
22 $(MESA_GLAPI_DIR)/glapi_gentable.c
24 MESA_GLAPI_ASM_OUTPUTS = \
25 $(MESA_GLAPI_DIR)/glapi_x86.S \
26 $(MESA_GLAPI_DIR)/glapi_x86-64.S \
27 $(MESA_GLAPI_DIR)/glapi_sparc.S
29 MESA_OUTPUTS = \
30 $(MESA_GLAPI_OUTPUTS) \
31 $(MESA_GLAPI_ASM_OUTPUTS) \
32 $(MESA_DIR)/main/enums.c \
33 $(MESA_DIR)/main/dispatch.h \
34 $(MESA_DIR)/main/remap_helper.h \
36 # $(MESA_GLX_DIR)/indirect.c \
37 # $(MESA_GLX_DIR)/indirect.h \
38 # $(MESA_GLX_DIR)/indirect_init.c \
39 # $(MESA_GLX_DIR)/indirect_size.h \
40 # $(MESA_GLX_DIR)/indirect_size.c
42 ######################################################################
44 XORG_GLX_DIR = $(XORG_BASE)/glx
45 XORG_GLAPI_DIR = $(XORG_BASE)/glx
47 XORG_GLAPI_FILES = \
48 $(XORG_GLAPI_DIR)/glapi_getproc.c \
49 $(XORG_GLAPI_DIR)/glapi_nop.c \
50 $(XORG_GLAPI_DIR)/glthread.c \
51 $(XORG_GLAPI_DIR)/glthread.h
53 XORG_GLAPI_OUTPUTS = \
54 $(XORG_GLAPI_DIR)/glprocs.h \
55 $(XORG_GLAPI_DIR)/glapioffsets.h \
56 $(XORG_GLAPI_DIR)/glapitable.h \
57 $(XORG_GLAPI_DIR)/glapidispatch.h \
58 $(XORG_GLAPI_DIR)/glapi_gentable.c
60 XORG_OUTPUTS = \
61 $(XORG_GLAPI_FILES) \
62 $(XORG_GLAPI_OUTPUTS) \
63 $(XORG_GLX_DIR)/indirect_dispatch.c \
64 $(XORG_GLX_DIR)/indirect_dispatch_swap.c \
65 $(XORG_GLX_DIR)/indirect_dispatch.h \
66 $(XORG_GLX_DIR)/indirect_reqsize.c \
67 $(XORG_GLX_DIR)/indirect_reqsize.h \
68 $(XORG_GLX_DIR)/indirect_size.h \
69 $(XORG_GLX_DIR)/indirect_size_get.c \
70 $(XORG_GLX_DIR)/indirect_size_get.h \
71 $(XORG_GLX_DIR)/indirect_table.c
73 ######################################################################
75 API_XML = \
76 gl_API.xml \
77 ARB_color_buffer_float.xml \
78 ARB_copy_buffer.xml \
79 ARB_depth_clamp.xml \
80 ARB_draw_buffers_blend.xml \
81 ARB_draw_elements_base_vertex.xml \
82 ARB_draw_instanced.xml \
83 ARB_ES2_compatibility.xml \
84 ARB_framebuffer_object.xml \
85 ARB_geometry_shader4.xml \
86 ARB_instanced_arrays.xml \
87 ARB_map_buffer_range.xml \
88 ARB_robustness.xml \
89 ARB_sampler_objects.xml \
90 ARB_seamless_cube_map.xml \
91 ARB_sync.xml \
92 ARB_texture_buffer_object.xml \
93 ARB_vertex_array_object.xml \
94 AMD_draw_buffers_blend.xml \
95 APPLE_object_purgeable.xml \
96 APPLE_vertex_array_object.xml \
97 EXT_draw_buffers2.xml \
98 EXT_framebuffer_object.xml \
99 EXT_gpu_shader4.xml \
100 EXT_packed_depth_stencil.xml \
101 EXT_provoking_vertex.xml \
102 EXT_separate_shader_objects.xml \
103 EXT_texture_array.xml \
104 EXT_texture_integer.xml \
105 EXT_transform_feedback.xml \
106 NV_conditional_render.xml \
107 NV_primitive_restart.xml \
108 NV_texture_barrier.xml \
109 OES_EGL_image.xml \
110 GL3x.xml
113 COMMON = $(API_XML) gl_XML.py glX_XML.py license.py typeexpr.py
115 COMMON_ES = \
116 $(COMMON) \
117 gl_and_es_API.xml \
118 es_EXT.xml \
119 ARB_ES2_compatibility.xml \
120 ARB_get_program_binary.xml \
121 OES_fixed_point.xml \
122 OES_single_precision.xml
124 COMMON_GLX = $(COMMON) glX_API.xml glX_XML.py glX_proto_common.py
126 ######################################################################
128 all: mesa xorg
130 mesa: $(MESA_OUTPUTS)
132 xorg: check-xorg-source $(XORG_OUTPUTS)
134 check-xorg-source:
135 @if ! test -d $(XORG_GLX_DIR); then \
136 echo "ERROR: Must specify path to xserver/ checkout. Set XORG_BASE env var."; \
137 if test x$(XORG_BASE) != x; then \
138 echo "'$(XORG_GLX_DIR)' does not exist."; \
139 fi; \
140 exit 1; \
143 clean:
144 -rm -f *~ *.pyo
145 -rm -f $(MESA_OUTPUTS)
147 ######################################################################
149 $(XORG_GLAPI_DIR)/%.c: $(MESA_GLAPI_DIR)/%.c
150 cp $< $@
152 $(XORG_GLAPI_DIR)/%.h: $(MESA_GLAPI_DIR)/%.h
153 cp $< $@
155 ######################################################################
157 $(MESA_GLAPI_DIR)/glapi_mapi_tmp.h: $(MESA_MAPI_DIR)/mapi_abi.py $(COMMON_ES)
158 $(PYTHON2) $(PYTHON_FLAGS) $< \
159 --printer glapi --mode lib gl_and_es_API.xml > $@
161 $(MESA_GLAPI_DIR)/glprocs.h: gl_procs.py $(COMMON)
162 $(PYTHON2) $(PYTHON_FLAGS) $< > $@
164 $(MESA_GLAPI_DIR)/glapitemp.h: gl_apitemp.py $(COMMON)
165 $(PYTHON2) $(PYTHON_FLAGS) $< > $@
167 $(MESA_GLAPI_DIR)/glapitable.h: gl_table.py $(COMMON)
168 $(PYTHON2) $(PYTHON_FLAGS) $< > $@
170 $(MESA_GLAPI_DIR)/glapi_gentable.c: gl_gentable.py $(COMMON)
171 $(PYTHON2) $(PYTHON_FLAGS) $< > $@
173 ######################################################################
175 $(MESA_GLAPI_DIR)/glapi_x86.S: gl_x86_asm.py $(COMMON)
176 $(PYTHON2) $(PYTHON_FLAGS) $< > $@
178 $(MESA_GLAPI_DIR)/glapi_x86-64.S: gl_x86-64_asm.py $(COMMON)
179 $(PYTHON2) $(PYTHON_FLAGS) $< > $@
181 $(MESA_GLAPI_DIR)/glapi_sparc.S: gl_SPARC_asm.py $(COMMON)
182 $(PYTHON2) $(PYTHON_FLAGS) $< > $@
184 ######################################################################
186 $(MESA_DIR)/main/enums.c: gl_enums.py $(COMMON) $(ES_API)
187 $(PYTHON2) $(PYTHON_FLAGS) $< -f gl_API.xml \
188 -f $(MESA_GLAPI_DIR)/gen-es/es1_API.xml \
189 -f $(MESA_GLAPI_DIR)/gen-es/es2_API.xml > $@
191 $(MESA_DIR)/main/dispatch.h: gl_table.py $(COMMON)
192 $(PYTHON2) $(PYTHON_FLAGS) $< -m remap_table > $@
194 $(MESA_DIR)/main/remap_helper.h: remap_helper.py $(COMMON)
195 $(PYTHON2) $(PYTHON_FLAGS) $< > $@
197 ######################################################################
199 $(MESA_GLX_DIR)/indirect.c: glX_proto_send.py $(COMMON_GLX)
200 $(PYTHON2) $(PYTHON_FLAGS) $< -m proto | $(INDENT) $(INDENT_FLAGS) > $@
202 $(MESA_GLX_DIR)/indirect.h: glX_proto_send.py $(COMMON_GLX)
203 $(PYTHON2) $(PYTHON_FLAGS) $< -m init_h > $@
205 $(MESA_GLX_DIR)/indirect_init.c: glX_proto_send.py $(COMMON_GLX)
206 $(PYTHON2) $(PYTHON_FLAGS) $< -m init_c > $@
208 $(MESA_GLX_DIR)/indirect_size.h $(XORG_GLX_DIR)/indirect_size.h: glX_proto_size.py $(COMMON_GLX)
209 $(PYTHON2) $(PYTHON_FLAGS) $< -m size_h --only-set -h _INDIRECT_SIZE_H_ \
210 | $(INDENT) $(INDENT_FLAGS) > $@
212 $(MESA_GLX_DIR)/indirect_size.c: glX_proto_size.py $(COMMON_GLX)
213 $(PYTHON2) $(PYTHON_FLAGS) $< -m size_c --only-set \
214 | $(INDENT) $(INDENT_FLAGS) > $@
216 ######################################################################
218 $(XORG_GLX_DIR)/indirect_dispatch.c: glX_proto_recv.py $(COMMON_GLX)
219 $(PYTHON2) $(PYTHON_FLAGS) $< -m dispatch_c > $@
221 $(XORG_GLX_DIR)/indirect_dispatch_swap.c: glX_proto_recv.py $(COMMON_GLX)
222 $(PYTHON2) $(PYTHON_FLAGS) $< -m dispatch_c -s > $@
224 $(XORG_GLX_DIR)/indirect_dispatch.h: glX_proto_recv.py gl_and_glX_API.xml $(COMMON_GLX)
225 $(PYTHON2) $(PYTHON_FLAGS) $< -m dispatch_h -f gl_and_glX_API.xml -s > $@
227 $(XORG_GLX_DIR)/indirect_size_get.h: glX_proto_size.py $(COMMON_GLX)
228 $(PYTHON2) $(PYTHON_FLAGS) $< -m size_h --only-get -h '_INDIRECT_SIZE_GET_H_' \
229 | $(INDENT) $(INDENT_FLAGS) > $@
231 $(XORG_GLX_DIR)/indirect_size_get.c: glX_proto_size.py $(COMMON_GLX)
232 $(PYTHON2) $(PYTHON_FLAGS) $< -m size_c | $(INDENT) $(INDENT_FLAGS) > $@
234 $(XORG_GLX_DIR)/indirect_reqsize.h: glX_proto_size.py $(COMMON_GLX)
235 $(PYTHON2) $(PYTHON_FLAGS) $< -m reqsize_h --only-get -h '_INDIRECT_SIZE_GET_H_' \
236 | $(INDENT) $(INDENT_FLAGS) -l200 > $@
238 $(XORG_GLX_DIR)/indirect_reqsize.c: glX_proto_size.py $(COMMON_GLX)
239 $(PYTHON2) $(PYTHON_FLAGS) $< -m reqsize_c | $(INDENT) $(INDENT_FLAGS) > $@
241 $(XORG_GLX_DIR)/indirect_table.c: glX_server_table.py gl_and_glX_API.xml $(COMMON_GLX)
242 $(PYTHON2) $(PYTHON_FLAGS) $< -f gl_and_glX_API.xml > $@