1# Copyright © 2020-2021 Collabora, Ltd. 2# Author: Antonio Caggiano <antonio.caggiano@collabora.com> 3# 4# SPDX-License-Identifier: MIT 5 6intel_tracepoint_files = custom_target( 7 'intel_tracepoints.[ch]', 8 input : 'intel_tracepoints.py', 9 output : ['intel_tracepoints.h', 10 'intel_tracepoints_perfetto.h', 11 'intel_tracepoints.c'], 12 command : [ 13 prog_python, '@INPUT@', 14 '-p', join_paths(meson.source_root(), 'src/util/perf/'), 15 '--utrace-hdr', '@OUTPUT0@', 16 '--perfetto-hdr', '@OUTPUT1@', 17 '--utrace-src', '@OUTPUT2@', 18 ], 19 depend_files : u_trace_py, 20) 21 22libintel_driver_ds_deps = [ 23 idep_mesautil, 24 idep_nir_headers, 25] 26 27if with_perfetto 28 libintel_driver_ds_deps += dep_perfetto 29endif 30 31idep_intel_driver_ds_headers = declare_dependency( 32 sources : intel_tracepoint_files[0], 33 include_directories : [inc_include, inc_mapi, inc_mesa, inc_intel], 34) 35 36libintel_driver_ds = static_library( 37 'intel-driver-ds', 38 sources : ['intel_driver_ds.cc', intel_tracepoint_files], 39 include_directories : [inc_src, inc_include, inc_intel, inc_mapi, inc_mesa], 40 link_with : [libintel_perf, libintel_dev], 41 dependencies : libintel_driver_ds_deps, 42 override_options : ['cpp_std=c++17'], 43 gnu_symbol_visibility : 'hidden', 44) 45 46idep_intel_driver_ds = declare_dependency( 47 link_with : libintel_driver_ds, 48 include_directories : [inc_include, inc_mapi, inc_mesa, inc_intel], 49 dependencies : idep_intel_driver_ds_headers, 50) 51 52if with_perfetto and (with_datasources.contains('intel') or with_datasources.contains('auto')) 53 pps_intel_sources = files( 54 'intel_pps_perf.cc', 55 'intel_pps_driver.cc', 56 ) 57 58 pps_intel_lib = static_library( 59 'pps-intel', 60 sources: pps_intel_sources, 61 include_directories: [inc_tool, inc_src, inc_include, inc_intel], 62 link_with: [libintel_perf, libintel_dev], 63 dependencies: [dep_perfetto, dep_libdrm, idep_mesautil], 64 override_options: ['cpp_std=c++17'] 65 ) 66 67 compile_args_pps_intel = ['-DPPS_INTEL'] 68 69 pps_intel_dep = declare_dependency( 70 link_with: pps_intel_lib, 71 include_directories: [inc_tool, inc_include], 72 compile_args: compile_args_pps_intel, 73 ) 74 75 pps_datasources += pps_intel_dep 76 if not with_datasources.contains('intel') 77 with_datasources += 'intel' 78 endif 79endif 80