blob: 19114b7831583320e9778ad2a63ae9e33ec60d4c [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 = [
Patrick Williamsb37d8262025-02-01 08:36:31 -05008 CLI11_dep,
9 phosphorlogging,
10 cxx.find_library('pdbg'),
11 cxx.find_library('libdt-api'),
12 cxx.find_library('phal'),
Dhruvaraj Subhashchandran858d1aa2021-10-27 03:26:06 -050013]
14
Patrick Williamsb37d8262025-02-01 08:36:31 -050015monitor_deps = [sdbusplus_dep, phosphorlogging]
Dhruvaraj Subhashchandrana07f34f2024-05-16 23:01:32 -050016
Dhruvaraj Subhashchandran858d1aa2021-10-27 03:26:06 -050017# source files
18
19collect_src = files(
Patrick Williamsb37d8262025-02-01 08:36:31 -050020 'create_pel.cpp',
Dhruvaraj Subhashchandran858d1aa2021-10-27 03:26:06 -050021 'dump_collect_main.cpp',
22 'dump_utils.cpp',
Dhruvaraj Subhashchandrane74e9162024-04-01 09:53:13 -050023 'dump_utils.cpp',
Patrick Williamsb37d8262025-02-01 08:36:31 -050024 'sbe_dump_collector.cpp',
Dhruvaraj Subhashchandran6feeebd2021-10-19 05:03:59 -050025 'sbe_type.cpp',
Dhruvaraj Subhashchandran858d1aa2021-10-27 03:26:06 -050026)
27
Dhruvaraj Subhashchandrana07f34f2024-05-16 23:01:32 -050028monitor_src = files(
29 'dump_monitor.cpp',
30 'dump_monitor_main.cpp',
31 'dump_utils.cpp',
32)
33
Patrick Williamsb37d8262025-02-01 08:36:31 -050034executable(
35 'dump-collect',
Dhruvaraj Subhashchandran858d1aa2021-10-27 03:26:06 -050036 collect_src,
37 dependencies: collect_deps,
38 implicit_include_directories: true,
Patrick Williamsb37d8262025-02-01 08:36:31 -050039 install: true,
Dhruvaraj Subhashchandran858d1aa2021-10-27 03:26:06 -050040)
Dhruvaraj Subhashchandran35714cd2024-05-16 05:54:38 -050041
Patrick Williamsb37d8262025-02-01 08:36:31 -050042executable(
43 'openpower-dump-monitor',
Dhruvaraj Subhashchandrana07f34f2024-05-16 23:01:32 -050044 monitor_src,
45 dependencies: monitor_deps,
46 implicit_include_directories: true,
Patrick Williamsb37d8262025-02-01 08:36:31 -050047 install: true,
Dhruvaraj Subhashchandrana07f34f2024-05-16 23:01:32 -050048)
49
Dhruvaraj Subhashchandran35714cd2024-05-16 05:54:38 -050050bindir = get_option('bindir')
Dhruvaraj Subhashchandran9eb4e482024-05-17 03:35:17 -050051dreport_include_dir = join_paths(get_option('datadir'), 'dreport.d/include.d')
Gopichand Paturi24226c42024-05-16 14:51:22 -050052dreport_plugins_dir = join_paths(get_option('datadir'), 'dreport.d/plugins.d')
Dhruvaraj Subhashchandran35714cd2024-05-16 05:54:38 -050053
Dhruvaraj Subhashchandran9eb4e482024-05-17 03:35:17 -050054scripts_to_install = []
Gopichand Paturi24226c42024-05-16 14:51:22 -050055plugins_to_install = []
Dhruvaraj Subhashchandran9eb4e482024-05-17 03:35:17 -050056include_scripts = []
Dhruvaraj Subhashchandran35714cd2024-05-16 05:54:38 -050057
58subdir('tools')
59# Install collected files if any
60if scripts_to_install.length() > 0
Patrick Williamsb37d8262025-02-01 08:36:31 -050061 install_data(
62 scripts_to_install,
Dhruvaraj Subhashchandran35714cd2024-05-16 05:54:38 -050063 install_dir: get_option('bindir'),
Patrick Williamsb37d8262025-02-01 08:36:31 -050064 install_mode: 'rwxr-xr-x',
Dhruvaraj Subhashchandran35714cd2024-05-16 05:54:38 -050065 )
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
Patrick Williamsb37d8262025-02-01 08:36:31 -050070 install_data(
71 plugins_to_install,
Gopichand Paturi24226c42024-05-16 14:51:22 -050072 install_dir: dreport_plugins_dir,
Patrick Williamsb37d8262025-02-01 08:36:31 -050073 install_mode: 'rwxr-xr-x',
Gopichand Paturi24226c42024-05-16 14:51:22 -050074 )
75endif
76
77# Install collected include scripts if any
Dhruvaraj Subhashchandran9eb4e482024-05-17 03:35:17 -050078if include_scripts.length() > 0
Patrick Williamsb37d8262025-02-01 08:36:31 -050079 install_data(
80 include_scripts,
Dhruvaraj Subhashchandran9eb4e482024-05-17 03:35:17 -050081 install_dir: dreport_include_dir,
Patrick Williamsb37d8262025-02-01 08:36:31 -050082 install_mode: 'rwxr-xr-x',
Dhruvaraj Subhashchandran9eb4e482024-05-17 03:35:17 -050083 )
84endif
Dhruvaraj Subhashchandran888472d2024-05-17 12:56:30 -050085
86subdir('dist')
87