blob: 8e82b028f973551ca76ac69e6d218e39e4ae0a6d [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')
Gopichand Paturi24226c42024-05-16 14:51:22 -050053dreport_plugins_dir = join_paths(get_option('datadir'), 'dreport.d/plugins.d')
Dhruvaraj Subhashchandran35714cd2024-05-16 05:54:38 -050054
Dhruvaraj Subhashchandran9eb4e482024-05-17 03:35:17 -050055scripts_to_install = []
Gopichand Paturi24226c42024-05-16 14:51:22 -050056plugins_to_install = []
Dhruvaraj Subhashchandran9eb4e482024-05-17 03:35:17 -050057include_scripts = []
Dhruvaraj Subhashchandran35714cd2024-05-16 05:54:38 -050058
59subdir('tools')
60# Install collected files if any
61if scripts_to_install.length() > 0
62 install_data(scripts_to_install,
63 install_dir: get_option('bindir'),
64 install_mode: 'rwxr-xr-x'
65 )
66endif
67
Dhruvaraj Subhashchandran9eb4e482024-05-17 03:35:17 -050068# Install collected include scripts if any
Gopichand Paturi24226c42024-05-16 14:51:22 -050069if plugins_to_install.length() > 0
70 install_data(plugins_to_install,
71 install_dir: dreport_plugins_dir,
72 install_mode: 'rwxr-xr-x'
73 )
74endif
75
76# Install collected include scripts if any
Dhruvaraj Subhashchandran9eb4e482024-05-17 03:35:17 -050077if include_scripts.length() > 0
78 install_data(include_scripts,
79 install_dir: dreport_include_dir,
80 install_mode: 'rwxr-xr-x'
81 )
82endif
Dhruvaraj Subhashchandran888472d2024-05-17 12:56:30 -050083
84subdir('dist')
85