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