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