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