Will Liang | a1d4202 | 2019-06-13 14:17:12 +0800 | [diff] [blame] | 1 | project( |
| 2 | 'phosphor-ecc', |
| 3 | 'cpp', |
| 4 | version: '1.0', |
| 5 | default_options: [ |
Patrick Williams | 9a31e9a | 2023-07-12 11:16:06 -0500 | [diff] [blame] | 6 | 'cpp_std=c++23', |
Will Liang | a1d4202 | 2019-06-13 14:17:12 +0800 | [diff] [blame] | 7 | ], |
Patrick Williams | 9a31e9a | 2023-07-12 11:16:06 -0500 | [diff] [blame] | 8 | meson_version: '>=1.1.1', |
Will Liang | a1d4202 | 2019-06-13 14:17:12 +0800 | [diff] [blame] | 9 | ) |
| 10 | |
| 11 | executable( |
| 12 | 'ecc_main', |
| 13 | [ |
| 14 | 'ecc_main.cpp', |
| 15 | 'ecc_manager.cpp', |
| 16 | ], |
| 17 | dependencies: [ |
| 18 | dependency('sdbusplus'), |
| 19 | dependency('sdeventplus'), |
| 20 | dependency('phosphor-dbus-interfaces'), |
| 21 | dependency('phosphor-logging'), |
| 22 | ], |
| 23 | install: true, |
| 24 | install_dir: get_option('bindir') |
| 25 | ) |
| 26 | |
| 27 | install_data(sources : 'maxlog.conf', install_dir : '/etc/ecc') |
| 28 | |
| 29 | conf_data = configuration_data() |
| 30 | conf_data.set('BUSNAME', '"xyz.openbmc_project.memory.ECC"') |
| 31 | conf_data.set('OBJROOT', '"/xyz/openbmc_project/metrics/memory/"') |
| 32 | conf_data.set('OBJPATH', '"/xyz/openbmc_project/metrics/memory/BmcECC"') |
| 33 | conf_data.set('sysfsRootPath', '"/sys/devices/system/edac/mc/mc0/"') |
| 34 | conf_data.set('sysfsEDACReportPath', '"/sys/module/edac_core/parameters/edac_report"') |
Eddie James | 28b153c | 2024-07-22 11:37:09 -0500 | [diff] [blame] | 35 | conf_data.set('ECC_PHOSPHOR_LOGGING', get_option('ecc-phosphor-logging').enabled()) |
Will Liang | a1d4202 | 2019-06-13 14:17:12 +0800 | [diff] [blame] | 36 | |
| 37 | configure_file(output : 'config.h', |
| 38 | configuration : conf_data) |
| 39 | |
George Hung | 0841f8a | 2020-09-28 11:12:05 +0800 | [diff] [blame] | 40 | systemd = dependency('systemd') |
| 41 | conf_data = configuration_data() |
| 42 | conf_data.set('bindir', get_option('prefix') / get_option('bindir')) |
| 43 | configure_file( |
| 44 | input: 'phosphor-ecc.service.in', |
| 45 | output: 'phosphor-ecc.service', |
| 46 | configuration: conf_data, |
| 47 | install: true, |
Patrick Williams | c0b4eae | 2023-04-12 08:05:58 -0500 | [diff] [blame] | 48 | install_dir: systemd.get_variable('systemdsystemunitdir')) |