1b8e80941Smrg# Copyright © 2017 Dylan Baker 2b8e80941Smrg# Copyright © 2017-2018 Intel Corporation 3b8e80941Smrg 4b8e80941Smrg# Permission is hereby granted, free of charge, to any person obtaining a copy 5b8e80941Smrg# of this software and associated documentation files (the "Software"), to deal 6b8e80941Smrg# in the Software without restriction, including without limitation the rights 7b8e80941Smrg# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8b8e80941Smrg# copies of the Software, and to permit persons to whom the Software is 9b8e80941Smrg# furnished to do so, subject to the following conditions: 10b8e80941Smrg 11b8e80941Smrg# The above copyright notice and this permission notice shall be included in 12b8e80941Smrg# all copies or substantial portions of the Software. 13b8e80941Smrg 14b8e80941Smrg# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15b8e80941Smrg# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16b8e80941Smrg# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17b8e80941Smrg# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18b8e80941Smrg# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19b8e80941Smrg# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20b8e80941Smrg# SOFTWARE. 21b8e80941Smrg 22b8e80941Smrginc_gallium_drivers = include_directories('drivers') 23b8e80941Smrginc_gallium_winsys = include_directories('winsys') 24b8e80941Smrg 25b8e80941Smrgsubdir('auxiliary') 26b8e80941Smrgsubdir('auxiliary/pipe-loader') 27b8e80941Smrgsubdir('winsys/sw/null') 28b8e80941Smrgif with_dri 29b8e80941Smrg subdir('winsys/sw/dri') 30b8e80941Smrgelse 31b8e80941Smrg libswdri = [] 32b8e80941Smrgendif 33b8e80941Smrgif with_gallium_drisw_kms 34b8e80941Smrg subdir('winsys/sw/kms-dri') 35b8e80941Smrgelse 36b8e80941Smrg libswkmsdri = [] 37b8e80941Smrgendif 38b8e80941Smrgsubdir('winsys/sw/wrapper') 39b8e80941Smrgif with_platform_haiku 40b8e80941Smrg subdir('winsys/sw/hgl') 41b8e80941Smrgendif 42b8e80941Smrgif with_gallium_swr 43b8e80941Smrg subdir('drivers/swr') 44b8e80941Smrgelse 45b8e80941Smrg driver_swr = declare_dependency() 46b8e80941Smrgendif 47b8e80941Smrgif with_gallium_softpipe 48b8e80941Smrg subdir('drivers/softpipe') 49b8e80941Smrg if with_llvm 50b8e80941Smrg subdir('drivers/llvmpipe') 51b8e80941Smrg endif 52b8e80941Smrgelse 53b8e80941Smrg driver_swrast = declare_dependency() 54b8e80941Smrgendif 55b8e80941Smrgif with_gallium_r300 or with_gallium_radeonsi or with_gallium_r600 56b8e80941Smrg subdir('winsys/radeon/drm') 57b8e80941Smrgendif 58b8e80941Smrgif with_gallium_r300 59b8e80941Smrg subdir('drivers/r300') 60b8e80941Smrgelse 61b8e80941Smrg driver_r300 = declare_dependency() 62b8e80941Smrgendif 63b8e80941Smrgif with_gallium_r600 64b8e80941Smrg subdir('drivers/r600') 65b8e80941Smrgelse 66b8e80941Smrg driver_r600 = declare_dependency() 67b8e80941Smrgendif 68b8e80941Smrgif with_gallium_radeonsi 69b8e80941Smrg subdir('winsys/amdgpu/drm') 70b8e80941Smrg subdir('drivers/radeonsi') 71b8e80941Smrgelse 72b8e80941Smrg driver_radeonsi = declare_dependency() 73b8e80941Smrgendif 74b8e80941Smrgif with_gallium_nouveau 75b8e80941Smrg subdir('winsys/nouveau/drm') 76b8e80941Smrg subdir('drivers/nouveau') 77b8e80941Smrgelse 78b8e80941Smrg driver_nouveau = declare_dependency() 79b8e80941Smrgendif 80b8e80941Smrgif with_gallium_freedreno 81b8e80941Smrg subdir('winsys/freedreno/drm') 82b8e80941Smrg subdir('drivers/freedreno') 83b8e80941Smrgelse 84b8e80941Smrg driver_freedreno = declare_dependency() 85b8e80941Smrgendif 86b8e80941Smrgif with_gallium_vc4 87b8e80941Smrg subdir('winsys/vc4/drm') 88b8e80941Smrg subdir('drivers/vc4') 89b8e80941Smrgelse 90b8e80941Smrg driver_vc4 = declare_dependency() 91b8e80941Smrgendif 92b8e80941Smrgif with_gallium_panfrost 93b8e80941Smrg subdir('winsys/panfrost/drm') 94b8e80941Smrg subdir('drivers/panfrost') 95b8e80941Smrgelse 96b8e80941Smrg driver_panfrost = declare_dependency() 97b8e80941Smrgendif 98b8e80941Smrgif with_gallium_etnaviv 99b8e80941Smrg subdir('winsys/etnaviv/drm') 100b8e80941Smrg subdir('drivers/etnaviv') 101b8e80941Smrgelse 102b8e80941Smrg driver_etnaviv = declare_dependency() 103b8e80941Smrgendif 104b8e80941Smrgif with_gallium_kmsro 105b8e80941Smrg subdir('winsys/kmsro/drm') 106b8e80941Smrgelse 107b8e80941Smrg driver_kmsro = declare_dependency() 108b8e80941Smrgendif 109b8e80941Smrgif with_gallium_v3d 110b8e80941Smrg subdir('winsys/v3d/drm') 111b8e80941Smrg subdir('drivers/v3d') 112b8e80941Smrgelse 113b8e80941Smrg driver_v3d = declare_dependency() 114b8e80941Smrgendif 115b8e80941Smrgif with_gallium_tegra 116b8e80941Smrg subdir('winsys/tegra/drm') 117b8e80941Smrg subdir('drivers/tegra') 118b8e80941Smrgelse 119b8e80941Smrg driver_tegra = declare_dependency() 120b8e80941Smrgendif 121b8e80941Smrgif with_gallium_iris 122b8e80941Smrg subdir('winsys/iris/drm') 123b8e80941Smrg subdir('drivers/iris') 124b8e80941Smrgelse 125b8e80941Smrg driver_iris = declare_dependency() 126b8e80941Smrgendif 127b8e80941Smrgif with_gallium_i915 128b8e80941Smrg subdir('winsys/i915/drm') 129b8e80941Smrg subdir('drivers/i915') 130b8e80941Smrgelse 131b8e80941Smrg driver_i915 = declare_dependency() 132b8e80941Smrgendif 133b8e80941Smrgif with_gallium_svga 134b8e80941Smrg subdir('winsys/svga/drm') 135b8e80941Smrg subdir('drivers/svga') 136b8e80941Smrgelse 137b8e80941Smrg driver_svga = declare_dependency() 138b8e80941Smrgendif 139b8e80941Smrgif with_gallium_virgl 140b8e80941Smrg subdir('winsys/virgl/drm') 141b8e80941Smrg subdir('winsys/virgl/vtest') 142b8e80941Smrg subdir('drivers/virgl') 143b8e80941Smrgelse 144b8e80941Smrg driver_virgl = declare_dependency() 145b8e80941Smrgendif 146b8e80941Smrgif with_gallium_lima 147b8e80941Smrg subdir('winsys/lima/drm') 148b8e80941Smrg subdir('drivers/lima') 149b8e80941Smrgelse 150b8e80941Smrg driver_lima = declare_dependency() 151b8e80941Smrgendif 152b8e80941Smrgif with_gallium_opencl 153b8e80941Smrg # TODO: this isn't really clover specific, but ATM clover is the only 154b8e80941Smrg # consumer 155b8e80941Smrg subdir('targets/pipe-loader') 156b8e80941Smrg 157b8e80941Smrg subdir('state_trackers/clover') 158b8e80941Smrg subdir('targets/opencl') 159b8e80941Smrgendif 160b8e80941Smrgif with_dri 161b8e80941Smrg subdir('state_trackers/dri') 162b8e80941Smrg subdir('targets/dri') 163b8e80941Smrgendif 164b8e80941Smrgif with_osmesa == 'gallium' 165b8e80941Smrg subdir('state_trackers/osmesa') 166b8e80941Smrg subdir('targets/osmesa') 167b8e80941Smrgendif 168b8e80941Smrgif with_glx == 'gallium-xlib' 169b8e80941Smrg subdir('winsys/sw/xlib') 170b8e80941Smrg subdir('state_trackers/glx/xlib') 171b8e80941Smrg subdir('targets/libgl-xlib') 172b8e80941Smrgendif 173b8e80941Smrgif with_gallium_vdpau 174b8e80941Smrg subdir('state_trackers/vdpau') 175b8e80941Smrg subdir('targets/vdpau') 176b8e80941Smrgendif 177b8e80941Smrgif with_gallium_xvmc 178b8e80941Smrg subdir('state_trackers/xvmc') 179b8e80941Smrg subdir('targets/xvmc') 180b8e80941Smrgendif 181b8e80941Smrgif with_gallium_omx != 'disabled' 182b8e80941Smrg subdir('state_trackers/omx') 183b8e80941Smrg subdir('targets/omx') 184b8e80941Smrgendif 185b8e80941Smrgif with_gallium_va 186b8e80941Smrg subdir('state_trackers/va') 187b8e80941Smrg subdir('targets/va') 188b8e80941Smrgendif 189b8e80941Smrgif with_gallium_xa 190b8e80941Smrg subdir('state_trackers/xa') 191b8e80941Smrg subdir('targets/xa') 192b8e80941Smrgendif 193b8e80941Smrgif with_platform_haiku 194b8e80941Smrg subdir('state_trackers/hgl') 195b8e80941Smrg subdir('targets/haiku-softpipe') 196b8e80941Smrgendif 197b8e80941Smrgif with_gallium_st_nine 198b8e80941Smrg subdir('state_trackers/nine') 199b8e80941Smrg subdir('targets/d3dadapter9') 200b8e80941Smrgendif 201b8e80941Smrgif with_tests 202b8e80941Smrg subdir('targets/graw-null') 203b8e80941Smrg if with_glx == 'gallium-xlib' 204b8e80941Smrg subdir('targets/graw-xlib') 205b8e80941Smrg endif 206b8e80941Smrg subdir('tests') 207b8e80941Smrgendif 208