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') |
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 = [] |
| 55 | include_scripts = [] |
Dhruvaraj Subhashchandran | 35714cd | 2024-05-16 05:54:38 -0500 | [diff] [blame] | 56 | |
| 57 | subdir('tools') |
| 58 | # Install collected files if any |
| 59 | if scripts_to_install.length() > 0 |
| 60 | install_data(scripts_to_install, |
| 61 | install_dir: get_option('bindir'), |
| 62 | install_mode: 'rwxr-xr-x' |
| 63 | ) |
| 64 | endif |
| 65 | |
Dhruvaraj Subhashchandran | 9eb4e48 | 2024-05-17 03:35:17 -0500 | [diff] [blame] | 66 | # Install collected include scripts if any |
| 67 | if include_scripts.length() > 0 |
| 68 | install_data(include_scripts, |
| 69 | install_dir: dreport_include_dir, |
| 70 | install_mode: 'rwxr-xr-x' |
| 71 | ) |
| 72 | endif |
| 73 | |
| 74 | |