19f464c52Smaya# Copyright © 2017 Broadcom
29f464c52Smaya#
39f464c52Smaya# Permission is hereby granted, free of charge, to any person obtaining a copy
49f464c52Smaya# of this software and associated documentation files (the "Software"), to deal
59f464c52Smaya# in the Software without restriction, including without limitation the rights
69f464c52Smaya# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
79f464c52Smaya# copies of the Software, and to permit persons to whom the Software is
89f464c52Smaya# furnished to do so, subject to the following conditions:
99f464c52Smaya#
109f464c52Smaya# The above copyright notice and this permission notice shall be included in
119f464c52Smaya# all copies or substantial portions of the Software.
129f464c52Smaya#
139f464c52Smaya# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
149f464c52Smaya# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
159f464c52Smaya# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
169f464c52Smaya# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
179f464c52Smaya# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
189f464c52Smaya# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
199f464c52Smaya# SOFTWARE.
209f464c52Smaya
219f464c52Smayakmsro_c_args = []
229f464c52Smayaif with_gallium_etnaviv
239f464c52Smaya  kmsro_c_args += '-DGALLIUM_ETNAVIV'
249f464c52Smayaendif
259f464c52Smayaif with_gallium_lima
269f464c52Smaya  kmsro_c_args += '-DGALLIUM_LIMA'
279f464c52Smayaendif
289f464c52Smayaif with_gallium_v3d
299f464c52Smaya  kmsro_c_args += '-DGALLIUM_V3D'
309f464c52Smayaendif
319f464c52Smayaif with_gallium_vc4
329f464c52Smaya  kmsro_c_args += '-DGALLIUM_VC4'
339f464c52Smayaendif
349f464c52Smayaif with_gallium_freedreno
359f464c52Smaya  kmsro_c_args += '-DGALLIUM_FREEDRENO'
369f464c52Smayaendif
379f464c52Smayaif with_gallium_panfrost
389f464c52Smaya  kmsro_c_args += '-DGALLIUM_PANFROST'
399f464c52Smayaendif
409f464c52Smaya
419f464c52Smayalibkmsrowinsys = static_library(
429f464c52Smaya  'kmsrowinsys',
439f464c52Smaya  files('kmsro_drm_winsys.c'),
449f464c52Smaya  include_directories : [
459f464c52Smaya    inc_src, inc_include,
469f464c52Smaya    inc_gallium, inc_gallium_aux, inc_gallium_winsys,
479f464c52Smaya  ],
487ec681f3Smrg  c_args : [kmsro_c_args],
497ec681f3Smrg  gnu_symbol_visibility : 'hidden',
509f464c52Smaya  dependencies: dep_libdrm,
519f464c52Smaya)
529f464c52Smaya
539f464c52Smayadriver_kmsro = declare_dependency(
549f464c52Smaya  compile_args : '-DGALLIUM_KMSRO',
559f464c52Smaya  link_with : libkmsrowinsys,
569f464c52Smaya)
57