meson: Build i965 and dri stack
[mesa.git] / src / mapi / glapi / gen / meson.build
1 # Copyright © 2017 Intel Corporation
2
3 # Permission is hereby granted, free of charge, to any person obtaining a copy
4 # of this software and associated documentation files (the "Software"), to deal
5 # in the Software without restriction, including without limitation the rights
6 # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 # copies of the Software, and to permit persons to whom the Software is
8 # furnished to do so, subject to the following conditions:
9
10 # The above copyright notice and this permission notice shall be included in
11 # all copies or substantial portions of the Software.
12
13 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19 # SOFTWARE.
20
21 gl_and_es_api_files = files('gl_and_es_API.xml')
22
23 api_xml_files = files(
24 'gl_API.xml',
25 'es_EXT.xml',
26 'gl_and_es_API.xml',
27 'gl_and_glX_API.xml',
28 'ARB_base_instance.xml',
29 'ARB_blend_func_extended.xml',
30 'ARB_bindless_texture.xml',
31 'ARB_clear_buffer_object.xml',
32 'ARB_clear_texture.xml',
33 'ARB_clip_control.xml',
34 'ARB_color_buffer_float.xml',
35 'ARB_compressed_texture_pixel_storage.xml',
36 'ARB_compute_shader.xml',
37 'ARB_compute_variable_group_size.xml',
38 'ARB_copy_buffer.xml',
39 'ARB_copy_image.xml',
40 'ARB_debug_output.xml',
41 'ARB_depth_buffer_float.xml',
42 'ARB_depth_clamp.xml',
43 'ARB_direct_state_access.xml',
44 'ARB_draw_buffers.xml',
45 'ARB_draw_buffers_blend.xml',
46 'ARB_draw_elements_base_vertex.xml',
47 'ARB_draw_indirect.xml',
48 'ARB_draw_instanced.xml',
49 'ARB_ES2_compatibility.xml',
50 'ARB_ES3_compatibility.xml',
51 'ARB_framebuffer_no_attachments.xml',
52 'ARB_framebuffer_object.xml',
53 'ARB_get_program_binary.xml',
54 'ARB_get_texture_sub_image.xml',
55 'ARB_gpu_shader_fp64.xml',
56 'ARB_gpu_shader_int64.xml',
57 'ARB_gpu_shader5.xml',
58 'ARB_indirect_parameters.xml',
59 'ARB_instanced_arrays.xml',
60 'ARB_internalformat_query.xml',
61 'ARB_internalformat_query2.xml',
62 'ARB_invalidate_subdata.xml',
63 'ARB_map_buffer_range.xml',
64 'ARB_multi_bind.xml',
65 'ARB_pipeline_statistics_query.xml',
66 'ARB_program_interface_query.xml',
67 'ARB_robustness.xml',
68 'ARB_sample_shading.xml',
69 'ARB_sampler_objects.xml',
70 'ARB_seamless_cube_map.xml',
71 'ARB_separate_shader_objects.xml',
72 'ARB_shader_atomic_counters.xml',
73 'ARB_shader_image_load_store.xml',
74 'ARB_shader_subroutine.xml',
75 'ARB_shader_storage_buffer_object.xml',
76 'ARB_sparse_buffer.xml',
77 'ARB_sync.xml',
78 'ARB_tessellation_shader.xml',
79 'ARB_texture_barrier.xml',
80 'ARB_texture_buffer_object.xml',
81 'ARB_texture_buffer_range.xml',
82 'ARB_texture_compression_rgtc.xml',
83 'ARB_texture_cube_map_array.xml',
84 'ARB_texture_float.xml',
85 'ARB_texture_gather.xml',
86 'ARB_texture_multisample.xml',
87 'ARB_texture_rgb10_a2ui.xml',
88 'ARB_texture_rg.xml',
89 'ARB_texture_storage_multisample.xml',
90 'ARB_texture_storage.xml',
91 'ARB_texture_view.xml',
92 'ARB_uniform_buffer_object.xml',
93 'ARB_vertex_array_object.xml',
94 'ARB_vertex_attrib_64bit.xml',
95 'ARB_vertex_attrib_binding.xml',
96 'ARB_viewport_array.xml',
97 'AMD_draw_buffers_blend.xml',
98 'AMD_performance_monitor.xml',
99 'ARB_vertex_type_2_10_10_10_rev.xml',
100 'APPLE_object_purgeable.xml',
101 'APPLE_vertex_array_object.xml',
102 'EXT_draw_buffers2.xml',
103 'EXT_external_objects.xml',
104 'EXT_external_objects_fd.xml',
105 'EXT_framebuffer_object.xml',
106 'EXT_gpu_shader4.xml',
107 'EXT_packed_depth_stencil.xml',
108 'EXT_provoking_vertex.xml',
109 'EXT_separate_shader_objects.xml',
110 'EXT_texture_array.xml',
111 'EXT_texture_integer.xml',
112 'EXT_transform_feedback.xml',
113 'EXT_window_rectangles.xml',
114 'GREMEDY_string_marker.xml',
115 'INTEL_performance_query.xml',
116 'KHR_debug.xml',
117 'KHR_context_flush_control.xml',
118 'KHR_robustness.xml',
119 'KHR_robustness_es.xml',
120 'KHR_texture_compression_astc.xml',
121 'NV_conditional_render.xml',
122 'NV_primitive_restart.xml',
123 'NV_texture_barrier.xml',
124 'NV_vdpau_interop.xml',
125 'OES_EGL_image.xml',
126 'OES_fixed_point.xml',
127 'OES_single_precision.xml',
128 'OES_texture_compression_astc.xml',
129 'GL3x.xml',
130 'GL4x.xml',
131 )
132
133 glapi_gen_depends = files(
134 'gl_XML.py',
135 'glX_XML.py',
136 'license.py',
137 'static_data.py',
138 'typeexpr.py',
139 ) + api_xml_files
140
141 glx_gen_depends = files(
142 'glX_API.xml',
143 'glX_XML.py',
144 'glX_proto_common.py',
145 ) + api_xml_files
146
147 glapi_mapi_tmp_h = custom_target(
148 'glapi_mapi_tmp.h',
149 input : ['../../mapi_abi.py', 'gl_and_es_API.xml'],
150 output : 'glapi_mapi_tmp.h',
151 command : [prog_python2, '@INPUT0@', '--printer', 'glapi', '@INPUT1@'],
152 depend_files : glapi_gen_depends,
153 capture : true,
154 )
155
156 gl_procs_h = custom_target(
157 'gl_procs.h',
158 input : ['gl_procs.py', 'gl_and_es_API.xml'],
159 output : 'gl_procs.h',
160 command : [prog_python2, '@INPUT0@', '-c', '-f', '@INPUT1@'],
161 depend_files : glapi_gen_depends,
162 capture : true,
163 )
164
165 glapitemp_h = custom_target(
166 'glapitemp.h',
167 input : ['gl_apitemp.py', 'gl_and_es_API.xml'],
168 output : 'glapitemp.h',
169 command : [prog_python2, '@INPUT0@', '-f', '@INPUT1@'],
170 depend_files : glapi_gen_depends,
171 capture : true,
172 )
173
174 glapitable_h = custom_target(
175 'glapitable.h',
176 input : ['gl_table.py', 'gl_and_es_API.xml'],
177 output : 'glapitable.h',
178 command : [prog_python2, '@INPUT0@', '-f', '@INPUT1@'],
179 depend_files : glapi_gen_depends,
180 capture : true,
181 )
182
183 glapi_gentable_c = custom_target(
184 'glapi_gentable.c',
185 input : ['gl_gentable.py', 'gl_and_es_API.xml'],
186 output : 'glapi_gentable.c',
187 command : [prog_python2, '@INPUT0@', '-f', '@INPUT1@'],
188 depend_files : glapi_gen_depends,
189 capture : true,
190 )
191
192 main_enums_c = custom_target(
193 'enums.c',
194 input : ['gl_enums.py', files('../registry/gl.xml')],
195 output : 'enums.c',
196 command : [prog_python2, '@INPUT0@', '-f', '@INPUT1@'],
197 capture : true,
198 )
199
200 main_api_exec_c = custom_target(
201 'api_exec.c',
202 input : ['gl_genexec.py', 'gl_and_es_API.xml'],
203 output : 'api_exec.c',
204 command : [prog_python2, '@INPUT0@', '-f', '@INPUT1@'],
205 depend_files : files('apiexec.py') + glapi_gen_depends,
206 capture : true,
207 )
208
209 main_marshal_generated_c = custom_target(
210 'marshal_generated.c',
211 input : ['gl_marshal.py', 'gl_and_es_API.xml'],
212 output : 'marshal_generated.c',
213 command : [prog_python2, '@INPUT0@', '-f', '@INPUT1@'],
214 depend_files : files('marshal_XML.py') + glapi_gen_depends,
215 capture : true,
216 )
217
218 glx_generated = []
219
220 foreach x : [['indirect.c', 'proto'], ['indirect.h', 'init_h'], ['indirect_init.c', 'init_c']]
221 glx_generated += custom_target(
222 x[0],
223 input : ['glX_proto_send.py', 'gl_API.xml'],
224 output : x[0],
225 command : [prog_python2, '@INPUT0@', '-f', '@INPUT1@', '-m', x[1]],
226 depend_files : glx_gen_depends,
227 capture : true,
228 )
229 endforeach
230
231 foreach x : [['indirect_size.h', ['-m', 'size_h', '--header-tag', '_INDIRECT_SIZE_H_']],
232 ['indirect_size.c', ['-m', 'size_c']]]
233 glx_generated += custom_target(
234 x[0],
235 input : ['glX_proto_size.py', 'gl_API.xml'],
236 output : x[0],
237 command : [prog_python2, '@INPUT0@', '-f', '@INPUT1@', '--only-set', x[1]],
238 depend_files : glx_gen_depends,
239 capture : true,
240 )
241 endforeach
242
243 glapi_x86_s = custom_target(
244 'glapi_x86.S',
245 input : ['gl_x86_asm.py', gl_and_es_api_files],
246 output : 'glapi_x86.S',
247 command : [prog_python2, '@INPUT0@', '-f', '@INPUT1@'],
248 depend_files : glapi_gen_depends,
249 capture : true,
250 )
251
252 glapi_x86_64_s = custom_target(
253 'glapi_x86-64.S',
254 input : ['gl_x86-64_asm.py', gl_and_es_api_files],
255 output : 'glapi_x86-64.S',
256 command : [prog_python2, '@INPUT0@', '-f', '@INPUT1@'],
257 depend_files : glapi_gen_depends,
258 capture : true,
259 )
260
261 glapi_sparc_s = custom_target(
262 'glapi_sparc.S',
263 input : ['gl_SPARC_asm.py', gl_and_es_api_files],
264 output : 'glapi_sparc.S',
265 command : [prog_python2, '@INPUT0@', '-f', '@INPUT1@'],
266 depend_files : glapi_gen_depends,
267 capture : true,
268 )