Dhruvaraj Subhashchandran | 858d1aa | 2021-10-27 03:26:06 -0500 | [diff] [blame] | 1 | # SPDX-License-Identifier: Apache-2.0 |
| 2 | |
| 3 | cxx = meson.get_compiler('cpp') |
| 4 | |
Dhruvaraj Subhashchandran | a07f34f | 2024-05-16 23:01:32 -0500 | [diff] [blame] | 5 | sdeventplus_dep = dependency('sdeventplus') |
| 6 | |
Dhruvaraj Subhashchandran | 858d1aa | 2021-10-27 03:26:06 -0500 | [diff] [blame] | 7 | collect_deps = [ |
Patrick Williams | b37d826 | 2025-02-01 08:36:31 -0500 | [diff] [blame] | 8 | CLI11_dep, |
| 9 | phosphorlogging, |
| 10 | cxx.find_library('pdbg'), |
| 11 | cxx.find_library('libdt-api'), |
| 12 | cxx.find_library('phal'), |
Dhruvaraj Subhashchandran | 858d1aa | 2021-10-27 03:26:06 -0500 | [diff] [blame] | 13 | ] |
| 14 | |
Patrick Williams | b37d826 | 2025-02-01 08:36:31 -0500 | [diff] [blame] | 15 | monitor_deps = [sdbusplus_dep, phosphorlogging] |
Dhruvaraj Subhashchandran | a07f34f | 2024-05-16 23:01:32 -0500 | [diff] [blame] | 16 | |
Dhruvaraj Subhashchandran | 858d1aa | 2021-10-27 03:26:06 -0500 | [diff] [blame] | 17 | # source files |
| 18 | |
| 19 | collect_src = files( |
Patrick Williams | b37d826 | 2025-02-01 08:36:31 -0500 | [diff] [blame] | 20 | 'create_pel.cpp', |
Dhruvaraj Subhashchandran | 858d1aa | 2021-10-27 03:26:06 -0500 | [diff] [blame] | 21 | 'dump_collect_main.cpp', |
| 22 | 'dump_utils.cpp', |
Dhruvaraj Subhashchandran | e74e916 | 2024-04-01 09:53:13 -0500 | [diff] [blame] | 23 | 'dump_utils.cpp', |
Patrick Williams | b37d826 | 2025-02-01 08:36:31 -0500 | [diff] [blame] | 24 | 'sbe_dump_collector.cpp', |
Dhruvaraj Subhashchandran | 6feeebd | 2021-10-19 05:03:59 -0500 | [diff] [blame] | 25 | 'sbe_type.cpp', |
Dhruvaraj Subhashchandran | 858d1aa | 2021-10-27 03:26:06 -0500 | [diff] [blame] | 26 | ) |
| 27 | |
Dhruvaraj Subhashchandran | a07f34f | 2024-05-16 23:01:32 -0500 | [diff] [blame] | 28 | monitor_src = files( |
| 29 | 'dump_monitor.cpp', |
| 30 | 'dump_monitor_main.cpp', |
| 31 | 'dump_utils.cpp', |
| 32 | ) |
| 33 | |
Patrick Williams | b37d826 | 2025-02-01 08:36:31 -0500 | [diff] [blame] | 34 | executable( |
| 35 | 'dump-collect', |
Dhruvaraj Subhashchandran | 858d1aa | 2021-10-27 03:26:06 -0500 | [diff] [blame] | 36 | collect_src, |
| 37 | dependencies: collect_deps, |
| 38 | implicit_include_directories: true, |
Patrick Williams | b37d826 | 2025-02-01 08:36:31 -0500 | [diff] [blame] | 39 | install: true, |
Dhruvaraj Subhashchandran | 858d1aa | 2021-10-27 03:26:06 -0500 | [diff] [blame] | 40 | ) |
Dhruvaraj Subhashchandran | 35714cd | 2024-05-16 05:54:38 -0500 | [diff] [blame] | 41 | |
Patrick Williams | b37d826 | 2025-02-01 08:36:31 -0500 | [diff] [blame] | 42 | executable( |
| 43 | 'openpower-dump-monitor', |
Dhruvaraj Subhashchandran | a07f34f | 2024-05-16 23:01:32 -0500 | [diff] [blame] | 44 | monitor_src, |
| 45 | dependencies: monitor_deps, |
| 46 | implicit_include_directories: true, |
Patrick Williams | b37d826 | 2025-02-01 08:36:31 -0500 | [diff] [blame] | 47 | install: true, |
Dhruvaraj Subhashchandran | a07f34f | 2024-05-16 23:01:32 -0500 | [diff] [blame] | 48 | ) |
| 49 | |
Dhruvaraj Subhashchandran | 35714cd | 2024-05-16 05:54:38 -0500 | [diff] [blame] | 50 | bindir = get_option('bindir') |
Dhruvaraj Subhashchandran | 9eb4e48 | 2024-05-17 03:35:17 -0500 | [diff] [blame] | 51 | dreport_include_dir = join_paths(get_option('datadir'), 'dreport.d/include.d') |
Gopichand Paturi | 24226c4 | 2024-05-16 14:51:22 -0500 | [diff] [blame] | 52 | dreport_plugins_dir = join_paths(get_option('datadir'), 'dreport.d/plugins.d') |
Dhruvaraj Subhashchandran | 35714cd | 2024-05-16 05:54:38 -0500 | [diff] [blame] | 53 | |
Dhruvaraj Subhashchandran | 9eb4e48 | 2024-05-17 03:35:17 -0500 | [diff] [blame] | 54 | scripts_to_install = [] |
Gopichand Paturi | 24226c4 | 2024-05-16 14:51:22 -0500 | [diff] [blame] | 55 | plugins_to_install = [] |
Dhruvaraj Subhashchandran | 9eb4e48 | 2024-05-17 03:35:17 -0500 | [diff] [blame] | 56 | include_scripts = [] |
Dhruvaraj Subhashchandran | 35714cd | 2024-05-16 05:54:38 -0500 | [diff] [blame] | 57 | |
| 58 | subdir('tools') |
| 59 | # Install collected files if any |
| 60 | if scripts_to_install.length() > 0 |
Patrick Williams | b37d826 | 2025-02-01 08:36:31 -0500 | [diff] [blame] | 61 | install_data( |
| 62 | scripts_to_install, |
Dhruvaraj Subhashchandran | 35714cd | 2024-05-16 05:54:38 -0500 | [diff] [blame] | 63 | install_dir: get_option('bindir'), |
Patrick Williams | b37d826 | 2025-02-01 08:36:31 -0500 | [diff] [blame] | 64 | install_mode: 'rwxr-xr-x', |
Dhruvaraj Subhashchandran | 35714cd | 2024-05-16 05:54:38 -0500 | [diff] [blame] | 65 | ) |
| 66 | endif |
| 67 | |
Dhruvaraj Subhashchandran | 9eb4e48 | 2024-05-17 03:35:17 -0500 | [diff] [blame] | 68 | # Install collected include scripts if any |
Gopichand Paturi | 24226c4 | 2024-05-16 14:51:22 -0500 | [diff] [blame] | 69 | if plugins_to_install.length() > 0 |
Patrick Williams | b37d826 | 2025-02-01 08:36:31 -0500 | [diff] [blame] | 70 | install_data( |
| 71 | plugins_to_install, |
Gopichand Paturi | 24226c4 | 2024-05-16 14:51:22 -0500 | [diff] [blame] | 72 | install_dir: dreport_plugins_dir, |
Patrick Williams | b37d826 | 2025-02-01 08:36:31 -0500 | [diff] [blame] | 73 | install_mode: 'rwxr-xr-x', |
Gopichand Paturi | 24226c4 | 2024-05-16 14:51:22 -0500 | [diff] [blame] | 74 | ) |
| 75 | endif |
| 76 | |
| 77 | # Install collected include scripts if any |
Dhruvaraj Subhashchandran | 9eb4e48 | 2024-05-17 03:35:17 -0500 | [diff] [blame] | 78 | if include_scripts.length() > 0 |
Patrick Williams | b37d826 | 2025-02-01 08:36:31 -0500 | [diff] [blame] | 79 | install_data( |
| 80 | include_scripts, |
Dhruvaraj Subhashchandran | 9eb4e48 | 2024-05-17 03:35:17 -0500 | [diff] [blame] | 81 | install_dir: dreport_include_dir, |
Patrick Williams | b37d826 | 2025-02-01 08:36:31 -0500 | [diff] [blame] | 82 | install_mode: 'rwxr-xr-x', |
Dhruvaraj Subhashchandran | 9eb4e48 | 2024-05-17 03:35:17 -0500 | [diff] [blame] | 83 | ) |
| 84 | endif |
Dhruvaraj Subhashchandran | 888472d | 2024-05-17 12:56:30 -0500 | [diff] [blame] | 85 | |
| 86 | subdir('dist') |
| 87 | |