17ec681f3Smrg# Copyright © 2018 Rob Clark 27ec681f3Smrg# Copyright © 2019 Collabora 37ec681f3Smrg 47ec681f3Smrg# Permission is hereby granted, free of charge, to any person obtaining a copy 57ec681f3Smrg# of this software and associated documentation files (the "Software"), to deal 67ec681f3Smrg# in the Software without restriction, including without limitation the rights 77ec681f3Smrg# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 87ec681f3Smrg# copies of the Software, and to permit persons to whom the Software is 97ec681f3Smrg# furnished to do so, subject to the following conditions: 107ec681f3Smrg 117ec681f3Smrg# The above copyright notice and this permission notice shall be included in 127ec681f3Smrg# all copies or substantial portions of the Software. 137ec681f3Smrg 147ec681f3Smrg# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 157ec681f3Smrg# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 167ec681f3Smrg# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 177ec681f3Smrg# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 187ec681f3Smrg# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 197ec681f3Smrg# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 207ec681f3Smrg# SOFTWARE. 217ec681f3Smrg 227ec681f3Smrgdep_iokit = dependency('IOKit', required : false) 237ec681f3Smrg 247ec681f3Smrglibasahi_lib_files = files( 257ec681f3Smrg 'agx_device.c', 267ec681f3Smrg 'agx_formats.c', 277ec681f3Smrg 'pool.c', 287ec681f3Smrg 'tiling.c', 297ec681f3Smrg) 307ec681f3Smrg 317ec681f3Smrglibasahi_decode_files = files( 327ec681f3Smrg 'decode.c', 337ec681f3Smrg) 347ec681f3Smrg 357ec681f3Smrgagx_pack = custom_target( 367ec681f3Smrg 'agx_pack.h', 377ec681f3Smrg input : ['gen_pack.py', 'cmdbuf.xml'], 387ec681f3Smrg output : 'agx_pack.h', 397ec681f3Smrg command : [prog_python, '@INPUT@'], 407ec681f3Smrg capture : true, 417ec681f3Smrg) 427ec681f3Smrg 437ec681f3Smrgidep_agx_pack = declare_dependency( 447ec681f3Smrg sources : [agx_pack], 457ec681f3Smrg include_directories : include_directories('.'), 467ec681f3Smrg) 477ec681f3Smrg 487ec681f3Smrglibasahi_lib = static_library( 497ec681f3Smrg 'asahi_lib', 507ec681f3Smrg [libasahi_lib_files, agx_pack], 517ec681f3Smrg include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux, inc_asahi], 527ec681f3Smrg c_args : [no_override_init_args], 537ec681f3Smrg gnu_symbol_visibility : 'hidden', 547ec681f3Smrg dependencies: [dep_libdrm, idep_nir, dep_iokit], 557ec681f3Smrg build_by_default : false, 567ec681f3Smrg) 577ec681f3Smrg 587ec681f3Smrglibasahi_decode = static_library( 597ec681f3Smrg 'asahi_decode', 607ec681f3Smrg [libasahi_decode_files, agx_pack], 617ec681f3Smrg include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux, inc_asahi], 627ec681f3Smrg dependencies : idep_mesautil, 637ec681f3Smrg c_args : [no_override_init_args], 647ec681f3Smrg gnu_symbol_visibility : 'hidden', 657ec681f3Smrg build_by_default : false, 667ec681f3Smrg) 67