778b4ce4ac22f3fe4e9e77b0ce1e656fcb4047d1
[mesa.git] / src / gallium / auxiliary / meson.build
1 # Copyright © 2017 Dylan Baker
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 inc_gallium_aux = include_directories('.')
22
23 files_libgallium = files(
24 'cso_cache/cso_cache.c',
25 'cso_cache/cso_cache.h',
26 'cso_cache/cso_context.c',
27 'cso_cache/cso_context.h',
28 'cso_cache/cso_hash.c',
29 'cso_cache/cso_hash.h',
30 'draw/draw_cliptest_tmp.h',
31 'draw/draw_context.c',
32 'draw/draw_context.h',
33 'draw/draw_decompose_tmp.h',
34 'draw/draw_fs.c',
35 'draw/draw_fs.h',
36 'draw/draw_gs.c',
37 'draw/draw_gs.h',
38 'draw/draw_gs_tmp.h',
39 'draw/draw_pipe_aaline.c',
40 'draw/draw_pipe_aapoint.c',
41 'draw/draw_pipe.c',
42 'draw/draw_pipe.h',
43 'draw/draw_pipe_clip.c',
44 'draw/draw_pipe_cull.c',
45 'draw/draw_pipe_flatshade.c',
46 'draw/draw_pipe_offset.c',
47 'draw/draw_pipe_pstipple.c',
48 'draw/draw_pipe_stipple.c',
49 'draw/draw_pipe_twoside.c',
50 'draw/draw_pipe_unfilled.c',
51 'draw/draw_pipe_util.c',
52 'draw/draw_pipe_validate.c',
53 'draw/draw_pipe_vbuf.c',
54 'draw/draw_pipe_wide_line.c',
55 'draw/draw_pipe_wide_point.c',
56 'draw/draw_prim_assembler.c',
57 'draw/draw_prim_assembler.h',
58 'draw/draw_prim_assembler_tmp.h',
59 'draw/draw_private.h',
60 'draw/draw_pt.c',
61 'draw/draw_pt_decompose.h',
62 'draw/draw_pt_emit.c',
63 'draw/draw_pt_fetch.c',
64 'draw/draw_pt_fetch_emit.c',
65 'draw/draw_pt_fetch_shade_emit.c',
66 'draw/draw_pt_fetch_shade_pipeline.c',
67 'draw/draw_pt.h',
68 'draw/draw_pt_post_vs.c',
69 'draw/draw_pt_so_emit.c',
70 'draw/draw_pt_util.c',
71 'draw/draw_pt_vsplit.c',
72 'draw/draw_pt_vsplit_tmp.h',
73 'draw/draw_so_emit_tmp.h',
74 'draw/draw_split_tmp.h',
75 'draw/draw_vbuf.h',
76 'draw/draw_vertex.c',
77 'draw/draw_vertex.h',
78 'draw/draw_vs.c',
79 'draw/draw_vs_exec.c',
80 'draw/draw_vs.h',
81 'draw/draw_vs_variant.c',
82 'hud/font.c',
83 'hud/font.h',
84 'hud/hud_context.c',
85 'hud/hud_context.h',
86 'hud/hud_cpu.c',
87 'hud/hud_nic.c',
88 'hud/hud_cpufreq.c',
89 'hud/hud_diskstat.c',
90 'hud/hud_sensors_temp.c',
91 'hud/hud_driver_query.c',
92 'hud/hud_fps.c',
93 'hud/hud_private.h',
94 'indices/u_indices.h',
95 'indices/u_indices_priv.h',
96 'indices/u_primconvert.c',
97 'indices/u_primconvert.h',
98 'os/os_memory_aligned.h',
99 'os/os_memory_debug.h',
100 'os/os_memory_stdc.h',
101 'os/os_memory.h',
102 'os/os_misc.c',
103 'os/os_misc.h',
104 'os/os_mman.h',
105 'os/os_process.c',
106 'os/os_process.h',
107 'os/os_thread.h',
108 'os/os_time.c',
109 'os/os_time.h',
110 'pipebuffer/pb_buffer_fenced.c',
111 'pipebuffer/pb_buffer_fenced.h',
112 'pipebuffer/pb_buffer.h',
113 'pipebuffer/pb_buffer_malloc.c',
114 'pipebuffer/pb_bufmgr_alt.c',
115 'pipebuffer/pb_bufmgr_cache.c',
116 'pipebuffer/pb_bufmgr_debug.c',
117 'pipebuffer/pb_bufmgr.h',
118 'pipebuffer/pb_bufmgr_mm.c',
119 'pipebuffer/pb_bufmgr_ondemand.c',
120 'pipebuffer/pb_bufmgr_pool.c',
121 'pipebuffer/pb_bufmgr_slab.c',
122 'pipebuffer/pb_cache.c',
123 'pipebuffer/pb_cache.h',
124 'pipebuffer/pb_slab.c',
125 'pipebuffer/pb_slab.h',
126 'pipebuffer/pb_validate.c',
127 'pipebuffer/pb_validate.h',
128 'postprocess/filters.h',
129 'postprocess/postprocess.h',
130 'postprocess/pp_celshade.c',
131 'postprocess/pp_celshade.h',
132 'postprocess/pp_colors.c',
133 'postprocess/pp_colors.h',
134 'postprocess/pp_filters.h',
135 'postprocess/pp_init.c',
136 'postprocess/pp_mlaa_areamap.h',
137 'postprocess/pp_mlaa.c',
138 'postprocess/pp_mlaa.h',
139 'postprocess/pp_private.h',
140 'postprocess/pp_program.c',
141 'postprocess/pp_run.c',
142 'rbug/rbug_connection.c',
143 'rbug/rbug_connection.h',
144 'rbug/rbug_context.c',
145 'rbug/rbug_context.h',
146 'rbug/rbug_core.c',
147 'rbug/rbug_core.h',
148 'rbug/rbug_demarshal.c',
149 'rbug/rbug.h',
150 'rbug/rbug_internal.h',
151 'rbug/rbug_proto.h',
152 'rbug/rbug_shader.c',
153 'rbug/rbug_shader.h',
154 'rbug/rbug_texture.c',
155 'rbug/rbug_texture.h',
156 'rtasm/rtasm_cpu.c',
157 'rtasm/rtasm_cpu.h',
158 'rtasm/rtasm_execmem.c',
159 'rtasm/rtasm_execmem.h',
160 'rtasm/rtasm_x86sse.c',
161 'rtasm/rtasm_x86sse.h',
162 'tgsi/tgsi_aa_point.c',
163 'tgsi/tgsi_aa_point.h',
164 'tgsi/tgsi_build.c',
165 'tgsi/tgsi_build.h',
166 'tgsi/tgsi_dump.c',
167 'tgsi/tgsi_dump.h',
168 'tgsi/tgsi_exec.c',
169 'tgsi/tgsi_exec.h',
170 'tgsi/tgsi_emulate.c',
171 'tgsi/tgsi_emulate.h',
172 'tgsi/tgsi_from_mesa.c',
173 'tgsi/tgsi_from_mesa.h',
174 'tgsi/tgsi_info.c',
175 'tgsi/tgsi_info.h',
176 'tgsi/tgsi_info_opcodes.h',
177 'tgsi/tgsi_iterate.c',
178 'tgsi/tgsi_iterate.h',
179 'tgsi/tgsi_lowering.c',
180 'tgsi/tgsi_lowering.h',
181 'tgsi/tgsi_opcode_tmp.h',
182 'tgsi/tgsi_parse.c',
183 'tgsi/tgsi_parse.h',
184 'tgsi/tgsi_point_sprite.c',
185 'tgsi/tgsi_point_sprite.h',
186 'tgsi/tgsi_sanity.c',
187 'tgsi/tgsi_sanity.h',
188 'tgsi/tgsi_scan.c',
189 'tgsi/tgsi_scan.h',
190 'tgsi/tgsi_strings.c',
191 'tgsi/tgsi_strings.h',
192 'tgsi/tgsi_text.c',
193 'tgsi/tgsi_text.h',
194 'tgsi/tgsi_transform.c',
195 'tgsi/tgsi_transform.h',
196 'tgsi/tgsi_two_side.c',
197 'tgsi/tgsi_two_side.h',
198 'tgsi/tgsi_ureg.c',
199 'tgsi/tgsi_ureg.h',
200 'tgsi/tgsi_util.c',
201 'tgsi/tgsi_util.h',
202 'translate/translate.c',
203 'translate/translate.h',
204 'translate/translate_cache.c',
205 'translate/translate_cache.h',
206 'translate/translate_generic.c',
207 'translate/translate_sse.c',
208 'util/dbghelp.h',
209 'util/u_bitcast.h',
210 'util/u_bitmask.c',
211 'util/u_bitmask.h',
212 'util/u_blend.h',
213 'util/u_blit.c',
214 'util/u_blit.h',
215 'util/u_blitter.c',
216 'util/u_blitter.h',
217 'util/u_box.h',
218 'util/u_cache.c',
219 'util/u_cache.h',
220 'util/u_cpu_detect.c',
221 'util/u_cpu_detect.h',
222 'util/u_debug.c',
223 'util/u_debug.h',
224 'util/u_debug_describe.c',
225 'util/u_debug_describe.h',
226 'util/u_debug_flush.c',
227 'util/u_debug_flush.h',
228 'util/u_debug_image.c',
229 'util/u_debug_image.h',
230 'util/u_debug_memory.c',
231 'util/u_debug_refcnt.c',
232 'util/u_debug_refcnt.h',
233 'util/u_debug_stack.c',
234 'util/u_debug_stack.h',
235 'util/u_debug_symbol.c',
236 'util/u_debug_symbol.h',
237 'util/u_dirty_flags.h',
238 'util/u_dirty_surfaces.h',
239 'util/u_dl.c',
240 'util/u_dl.h',
241 'util/u_draw.c',
242 'util/u_draw.h',
243 'util/u_draw_quad.c',
244 'util/u_draw_quad.h',
245 'util/u_dual_blend.h',
246 'util/u_dump_defines.c',
247 'util/u_dump.h',
248 'util/u_dump_state.c',
249 'util/u_fifo.h',
250 'util/u_format.c',
251 'util/u_format.h',
252 'util/u_format_etc.c',
253 'util/u_format_etc.h',
254 'util/u_format_latc.c',
255 'util/u_format_latc.h',
256 'util/u_format_other.c',
257 'util/u_format_other.h',
258 'util/u_format_rgtc.c',
259 'util/u_format_rgtc.h',
260 'util/u_format_s3tc.c',
261 'util/u_format_s3tc.h',
262 'util/u_format_tests.c',
263 'util/u_format_tests.h',
264 'util/u_format_yuv.c',
265 'util/u_format_yuv.h',
266 'util/u_format_zs.c',
267 'util/u_format_zs.h',
268 'util/u_framebuffer.c',
269 'util/u_framebuffer.h',
270 'util/u_gen_mipmap.c',
271 'util/u_gen_mipmap.h',
272 'util/u_half.h',
273 'util/u_handle_table.c',
274 'util/u_handle_table.h',
275 'util/u_hash_table.c',
276 'util/u_hash_table.h',
277 'util/u_helpers.c',
278 'util/u_helpers.h',
279 'util/u_idalloc.c',
280 'util/u_idalloc.h',
281 'util/u_index_modify.c',
282 'util/u_index_modify.h',
283 'util/u_inlines.h',
284 'util/u_linear.c',
285 'util/u_linear.h',
286 'util/u_log.c',
287 'util/u_log.h',
288 'util/u_math.c',
289 'util/u_math.h',
290 'util/u_memory.h',
291 'util/u_mm.c',
292 'util/u_mm.h',
293 'util/u_network.c',
294 'util/u_network.h',
295 'util/u_pack_color.h',
296 'util/u_pointer.h',
297 'util/u_prim.h',
298 'util/u_prim_restart.c',
299 'util/u_prim_restart.h',
300 'util/u_pstipple.c',
301 'util/u_pstipple.h',
302 'util/u_pwr8.h',
303 'util/u_range.h',
304 'util/u_rect.h',
305 'util/u_resource.c',
306 'util/u_resource.h',
307 'util/u_ringbuffer.c',
308 'util/u_ringbuffer.h',
309 'util/u_sampler.c',
310 'util/u_sampler.h',
311 'util/u_simple_shaders.c',
312 'util/u_simple_shaders.h',
313 'util/u_split_prim.h',
314 'util/u_sse.h',
315 'util/u_suballoc.c',
316 'util/u_suballoc.h',
317 'util/u_surface.c',
318 'util/u_surface.h',
319 'util/u_surfaces.c',
320 'util/u_surfaces.h',
321 'util/u_tests.c',
322 'util/u_tests.h',
323 'util/u_texture.c',
324 'util/u_texture.h',
325 'util/u_tile.c',
326 'util/u_tile.h',
327 'util/u_time.h',
328 'util/u_transfer.c',
329 'util/u_transfer.h',
330 'util/u_threaded_context.c',
331 'util/u_threaded_context.h',
332 'util/u_threaded_context_calls.h',
333 'util/u_upload_mgr.c',
334 'util/u_upload_mgr.h',
335 'util/u_vbuf.c',
336 'util/u_vbuf.h',
337 'util/u_video.h',
338 'util/u_viewport.h',
339 'nir/tgsi_to_nir.c',
340 'nir/tgsi_to_nir.h',
341 )
342
343 if dep_libdrm != [] and dep_libdrm.found()
344 files_libgallium += files(
345 'renderonly/renderonly.c',
346 'renderonly/renderonly.h',
347 )
348 endif
349
350 if with_llvm
351 files_libgallium += files(
352 'gallivm/lp_bld_arit.c',
353 'gallivm/lp_bld_arit.h',
354 'gallivm/lp_bld_arit_overflow.c',
355 'gallivm/lp_bld_arit_overflow.h',
356 'gallivm/lp_bld_assert.c',
357 'gallivm/lp_bld_assert.h',
358 'gallivm/lp_bld_bitarit.c',
359 'gallivm/lp_bld_bitarit.h',
360 'gallivm/lp_bld_const.c',
361 'gallivm/lp_bld_const.h',
362 'gallivm/lp_bld_conv.c',
363 'gallivm/lp_bld_conv.h',
364 'gallivm/lp_bld_debug.cpp',
365 'gallivm/lp_bld_debug.h',
366 'gallivm/lp_bld_flow.c',
367 'gallivm/lp_bld_flow.h',
368 'gallivm/lp_bld_format_aos_array.c',
369 'gallivm/lp_bld_format_aos.c',
370 'gallivm/lp_bld_format_cached.c',
371 'gallivm/lp_bld_format_float.c',
372 'gallivm/lp_bld_format.c',
373 'gallivm/lp_bld_format.h',
374 'gallivm/lp_bld_format_soa.c',
375 'gallivm/lp_bld_format_srgb.c',
376 'gallivm/lp_bld_format_yuv.c',
377 'gallivm/lp_bld_gather.c',
378 'gallivm/lp_bld_gather.h',
379 'gallivm/lp_bld.h',
380 'gallivm/lp_bld_init.c',
381 'gallivm/lp_bld_init.h',
382 'gallivm/lp_bld_intr.c',
383 'gallivm/lp_bld_intr.h',
384 'gallivm/lp_bld_limits.h',
385 'gallivm/lp_bld_logic.c',
386 'gallivm/lp_bld_logic.h',
387 'gallivm/lp_bld_misc.cpp',
388 'gallivm/lp_bld_misc.h',
389 'gallivm/lp_bld_pack.c',
390 'gallivm/lp_bld_pack.h',
391 'gallivm/lp_bld_printf.c',
392 'gallivm/lp_bld_printf.h',
393 'gallivm/lp_bld_quad.c',
394 'gallivm/lp_bld_quad.h',
395 'gallivm/lp_bld_sample_aos.c',
396 'gallivm/lp_bld_sample_aos.h',
397 'gallivm/lp_bld_sample.c',
398 'gallivm/lp_bld_sample.h',
399 'gallivm/lp_bld_sample_soa.c',
400 'gallivm/lp_bld_struct.c',
401 'gallivm/lp_bld_struct.h',
402 'gallivm/lp_bld_swizzle.c',
403 'gallivm/lp_bld_swizzle.h',
404 'gallivm/lp_bld_tgsi_action.c',
405 'gallivm/lp_bld_tgsi_action.h',
406 'gallivm/lp_bld_tgsi_aos.c',
407 'gallivm/lp_bld_tgsi.c',
408 'gallivm/lp_bld_tgsi.h',
409 'gallivm/lp_bld_tgsi_info.c',
410 'gallivm/lp_bld_tgsi_soa.c',
411 'gallivm/lp_bld_type.c',
412 'gallivm/lp_bld_type.h',
413 'draw/draw_llvm.c',
414 'draw/draw_llvm.h',
415 'draw/draw_llvm_sample.c',
416 'draw/draw_pt_fetch_shade_pipeline_llvm.c',
417 'draw/draw_vs_llvm.c',
418 )
419 endif
420
421 files_libgalliumvl = files(
422 'vl/vl_bicubic_filter.c',
423 'vl/vl_bicubic_filter.h',
424 'vl/vl_compositor.c',
425 'vl/vl_compositor.h',
426 'vl/vl_csc.c',
427 'vl/vl_csc.h',
428 'vl/vl_decoder.c',
429 'vl/vl_decoder.h',
430 'vl/vl_defines.h',
431 'vl/vl_deint_filter.c',
432 'vl/vl_deint_filter.h',
433 'vl/vl_idct.c',
434 'vl/vl_idct.h',
435 'vl/vl_matrix_filter.c',
436 'vl/vl_matrix_filter.h',
437 'vl/vl_mc.c',
438 'vl/vl_mc.h',
439 'vl/vl_median_filter.c',
440 'vl/vl_median_filter.h',
441 'vl/vl_mpeg12_bitstream.c',
442 'vl/vl_mpeg12_bitstream.h',
443 'vl/vl_mpeg12_decoder.c',
444 'vl/vl_mpeg12_decoder.h',
445 'vl/vl_rbsp.h',
446 'vl/vl_types.h',
447 'vl/vl_vertex_buffers.c',
448 'vl/vl_vertex_buffers.h',
449 'vl/vl_video_buffer.c',
450 'vl/vl_video_buffer.h',
451 'vl/vl_vlc.h',
452 'vl/vl_zscan.c',
453 'vl/vl_zscan.h',
454 )
455
456 files_libgalliumvlwinsys = files('vl/vl_winsys.h')
457 if with_dri2
458 files_libgalliumvlwinsys += files('vl/vl_winsys_dri.c')
459 if with_dri3
460 files_libgalliumvlwinsys += files('vl/vl_winsys_dri3.c')
461 endif
462 endif
463 if with_platform_drm
464 files_libgalliumvlwinsys += files('vl/vl_winsys_drm.c')
465 endif
466
467 u_indices_gen_c = custom_target(
468 'u_indices_gen.c',
469 input : 'indices/u_indices_gen.py',
470 output : 'u_indices_gen.c',
471 command : [prog_python2, '@INPUT@'],
472 capture : true,
473 )
474
475 u_unfilled_gen_c = custom_target(
476 'u_unfilled_gen.c',
477 input : 'indices/u_unfilled_gen.py',
478 output : 'u_unfilled_gen.c',
479 command : [prog_python2, '@INPUT@'],
480 capture : true,
481 )
482
483 u_format_table_c = custom_target(
484 'u_format_table.c',
485 input : ['util/u_format_table.py', 'util/u_format.csv'],
486 output : 'u_format_table.c',
487 command : [prog_python2, '@INPUT@'],
488 depend_files : files('util/u_format_pack.py', 'util/u_format_parse.py'),
489 capture : true,
490 )
491
492 libgallium = static_library(
493 'gallium',
494 [files_libgallium, u_indices_gen_c, u_unfilled_gen_c, u_format_table_c,
495 nir_opcodes_h],
496 include_directories : [
497 inc_loader, inc_gallium, inc_src, inc_include, include_directories('util')
498 ],
499 c_args : [c_vis_args, c_msvc_compat_args],
500 cpp_args : [cpp_vis_args, cpp_msvc_compat_args],
501 dependencies : [dep_libdrm, dep_llvm, dep_unwind, dep_dl],
502 build_by_default : false,
503 )
504
505 libgalliumvl_stub = static_library(
506 'galliumvl_stub',
507 'vl/vl_stubs.c',
508 c_args : [c_vis_args, c_msvc_compat_args],
509 cpp_args : [cpp_vis_args, cpp_msvc_compat_args],
510 include_directories: [inc_gallium, inc_include, inc_src],
511 build_by_default : false,
512 )
513
514 libgalliumvl = static_library(
515 'galliumvl',
516 files_libgalliumvl,
517 c_args : [c_vis_args, c_msvc_compat_args],
518 cpp_args : [cpp_vis_args, cpp_msvc_compat_args],
519 include_directories : [inc_gallium, inc_include, inc_src],
520 build_by_default : false,
521 )
522
523 # XXX: The dependencies here may be off...
524 libgalliumvlwinsys = static_library(
525 'galliumvlwinsys',
526 files_libgalliumvlwinsys,
527 include_directories : [inc_gallium, inc_include, inc_loader, inc_src],
528 dependencies : [dep_libdrm],
529 build_by_default : false,
530 )