xref: /aosp_15_r20/external/mesa3d/src/freedreno/perfcntrs/meson.build (revision 6104692788411f58d303aa86923a9ff6ecaded22)
1*61046927SAndroid Build Coastguard Worker# Copyright © 2018 Rob Clark
2*61046927SAndroid Build Coastguard Worker# SPDX-License-Identifier: MIT
3*61046927SAndroid Build Coastguard Worker
4*61046927SAndroid Build Coastguard Workerlibfreedreno_perfcntrs_files = files(
5*61046927SAndroid Build Coastguard Worker  'fd2_perfcntr.c',
6*61046927SAndroid Build Coastguard Worker  'fd5_perfcntr.c',
7*61046927SAndroid Build Coastguard Worker  'fd6_perfcntr.c',
8*61046927SAndroid Build Coastguard Worker  'fd7_perfcntr.c',
9*61046927SAndroid Build Coastguard Worker  'freedreno_dt.c',
10*61046927SAndroid Build Coastguard Worker  'freedreno_dt.h',
11*61046927SAndroid Build Coastguard Worker  'freedreno_perfcntr.c',
12*61046927SAndroid Build Coastguard Worker  'freedreno_perfcntr.h',
13*61046927SAndroid Build Coastguard Worker)
14*61046927SAndroid Build Coastguard Worker
15*61046927SAndroid Build Coastguard Workerlibfreedreno_perfcntrs = static_library(
16*61046927SAndroid Build Coastguard Worker  'freedreno_perfcntrs',
17*61046927SAndroid Build Coastguard Worker  [libfreedreno_perfcntrs_files, freedreno_xml_header_files],
18*61046927SAndroid Build Coastguard Worker  include_directories : [inc_freedreno, inc_include, inc_src],
19*61046927SAndroid Build Coastguard Worker  c_args : [no_override_init_args],
20*61046927SAndroid Build Coastguard Worker  gnu_symbol_visibility : 'hidden',
21*61046927SAndroid Build Coastguard Worker  link_with : [libfreedreno_common],
22*61046927SAndroid Build Coastguard Worker  dependencies : idep_nir_headers,
23*61046927SAndroid Build Coastguard Worker  build_by_default : false,
24*61046927SAndroid Build Coastguard Worker)
25*61046927SAndroid Build Coastguard Worker
26*61046927SAndroid Build Coastguard Workerdep_libconfig = dependency('libconfig', required : false)
27*61046927SAndroid Build Coastguard Workerdep_curses = dependency('curses', required : false)
28*61046927SAndroid Build Coastguard Worker
29*61046927SAndroid Build Coastguard Workerif dep_libconfig.found() and dep_curses.found()
30*61046927SAndroid Build Coastguard Worker  fdperf = executable(
31*61046927SAndroid Build Coastguard Worker    'fdperf',
32*61046927SAndroid Build Coastguard Worker    ['fdperf.c', freedreno_xml_header_files],
33*61046927SAndroid Build Coastguard Worker    include_directories : [
34*61046927SAndroid Build Coastguard Worker      inc_freedreno,
35*61046927SAndroid Build Coastguard Worker      inc_include,
36*61046927SAndroid Build Coastguard Worker      inc_src,
37*61046927SAndroid Build Coastguard Worker    ],
38*61046927SAndroid Build Coastguard Worker    link_with : [
39*61046927SAndroid Build Coastguard Worker      libfreedreno_common,
40*61046927SAndroid Build Coastguard Worker      libfreedreno_drm,
41*61046927SAndroid Build Coastguard Worker      libfreedreno_perfcntrs,
42*61046927SAndroid Build Coastguard Worker    ],
43*61046927SAndroid Build Coastguard Worker    dependencies : [
44*61046927SAndroid Build Coastguard Worker      dep_libconfig,
45*61046927SAndroid Build Coastguard Worker      dep_libdrm,
46*61046927SAndroid Build Coastguard Worker      dep_curses,
47*61046927SAndroid Build Coastguard Worker      idep_mesautil,
48*61046927SAndroid Build Coastguard Worker    ],
49*61046927SAndroid Build Coastguard Worker    build_by_default : with_tools.contains('freedreno'),
50*61046927SAndroid Build Coastguard Worker    install : with_tools.contains('freedreno'),
51*61046927SAndroid Build Coastguard Worker  )
52*61046927SAndroid Build Coastguard Workerendif
53