blob: 2640c7cfffa64615864a96ed706c66345bcf4bd8 [file] [log] [blame]
Dhruvaraj Subhashchandran858d1aa2021-10-27 03:26:06 -05001# SPDX-License-Identifier: Apache-2.0
2
3cxx = meson.get_compiler('cpp')
4
Dhruvaraj Subhashchandrana07f34f2024-05-16 23:01:32 -05005sdeventplus_dep = dependency('sdeventplus')
6
Dhruvaraj Subhashchandran858d1aa2021-10-27 03:26:06 -05007collect_deps = [
8 CLI11_dep,
9 phosphorlogging,
10 cxx.find_library('pdbg'),
11 cxx.find_library('libdt-api'),
12 cxx.find_library('phal'),
13]
14
Dhruvaraj Subhashchandrana07f34f2024-05-16 23:01:32 -050015monitor_deps = [
16 sdbusplus_dep,
17 phosphorlogging,
18]
19
Dhruvaraj Subhashchandran858d1aa2021-10-27 03:26:06 -050020# source files
21
22collect_src = files(
23 'sbe_dump_collector.cpp',
24 'dump_collect_main.cpp',
25 'dump_utils.cpp',
Dhruvaraj Subhashchandran6feeebd2021-10-19 05:03:59 -050026 'create_pel.cpp',
Dhruvaraj Subhashchandrane74e9162024-04-01 09:53:13 -050027 'dump_utils.cpp',
Dhruvaraj Subhashchandran6feeebd2021-10-19 05:03:59 -050028 'sbe_type.cpp',
Dhruvaraj Subhashchandran858d1aa2021-10-27 03:26:06 -050029)
30
Dhruvaraj Subhashchandrana07f34f2024-05-16 23:01:32 -050031monitor_src = files(
32 'dump_monitor.cpp',
33 'dump_monitor_main.cpp',
34 'dump_utils.cpp',
35)
36
Dhruvaraj Subhashchandran858d1aa2021-10-27 03:26:06 -050037executable('dump-collect',
38 collect_src,
39 dependencies: collect_deps,
40 implicit_include_directories: true,
41 install: true
42)
Dhruvaraj Subhashchandran35714cd2024-05-16 05:54:38 -050043
Dhruvaraj Subhashchandrana07f34f2024-05-16 23:01:32 -050044executable('openpower-dump-monitor',
45 monitor_src,
46 dependencies: monitor_deps,
47 implicit_include_directories: true,
48 install: true
49)
50
Dhruvaraj Subhashchandran35714cd2024-05-16 05:54:38 -050051bindir = get_option('bindir')
Dhruvaraj Subhashchandran9eb4e482024-05-17 03:35:17 -050052dreport_include_dir = join_paths(get_option('datadir'), 'dreport.d/include.d')
Dhruvaraj Subhashchandran35714cd2024-05-16 05:54:38 -050053
Dhruvaraj Subhashchandran9eb4e482024-05-17 03:35:17 -050054scripts_to_install = []
55include_scripts = []
Dhruvaraj Subhashchandran35714cd2024-05-16 05:54:38 -050056
57subdir('tools')
58# Install collected files if any
59if scripts_to_install.length() > 0
60 install_data(scripts_to_install,
61 install_dir: get_option('bindir'),
62 install_mode: 'rwxr-xr-x'
63 )
64endif
65
Dhruvaraj Subhashchandran9eb4e482024-05-17 03:35:17 -050066# Install collected include scripts if any
67if include_scripts.length() > 0
68 install_data(include_scripts,
69 install_dir: dreport_include_dir,
70 install_mode: 'rwxr-xr-x'
71 )
72endif
73
74