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 227ec681f3Smrginc_panfrost_hw = include_directories([ 237ec681f3Smrg 'include' 247ec681f3Smrg]) 257ec681f3Smrg 267ec681f3Smrginc_panfrost = include_directories([ 277ec681f3Smrg '.', 'include', 'shared', 'midgard', 'bifrost', 'lib' 287ec681f3Smrg]) 297ec681f3Smrg 307ec681f3Smrgsubdir('shared') 317ec681f3Smrgsubdir('util') 327ec681f3Smrgsubdir('midgard') 337ec681f3Smrgsubdir('bifrost') 347ec681f3Smrg 357ec681f3Smrgif with_gallium_panfrost or with_panfrost_vk 367ec681f3Smrg subdir('lib') 377ec681f3Smrg subdir('perf') 387ec681f3Smrgendif 397ec681f3Smrg 407ec681f3Smrgfiles_bifrost = files( 417ec681f3Smrg 'bifrost/cmdline.c', 427ec681f3Smrg) 437ec681f3Smrg 447ec681f3Smrgbifrost_compiler = executable( 457ec681f3Smrg 'bifrost_compiler', 467ec681f3Smrg [files_bifrost], 477ec681f3Smrg include_directories : [ 487ec681f3Smrg inc_mapi, 497ec681f3Smrg inc_mesa, 507ec681f3Smrg inc_gallium, 517ec681f3Smrg inc_gallium_aux, 527ec681f3Smrg inc_include, 537ec681f3Smrg inc_src, 547ec681f3Smrg inc_panfrost, 557ec681f3Smrg inc_panfrost_hw, 567ec681f3Smrg ], 577ec681f3Smrg dependencies : [ 587ec681f3Smrg idep_nir, 597ec681f3Smrg idep_mesautil, 607ec681f3Smrg idep_bi_opcodes_h, 617ec681f3Smrg dep_libdrm, 627ec681f3Smrg ], 637ec681f3Smrg link_with : [ 647ec681f3Smrg libglsl_standalone, 657ec681f3Smrg libpanfrost_bifrost, 667ec681f3Smrg ], 677ec681f3Smrg build_by_default : with_tools.contains('panfrost') 687ec681f3Smrg) 697ec681f3Smrg 707ec681f3Smrgif with_panfrost_vk 717ec681f3Smrg subdir('vulkan') 727ec681f3Smrgendif 737ec681f3Smrg 747ec681f3Smrgif with_perfetto and (with_datasources.contains('panfrost') or with_datasources.contains('auto')) 757ec681f3Smrg subdir('ds') 767ec681f3Smrgendif 777ec681f3Smrg 787ec681f3Smrgif with_tools.contains('drm-shim') 797ec681f3Smrg subdir('drm-shim') 807ec681f3Smrgendif 81