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: [ |
| 6 | 'cpp_std=c++17', |
| 7 | ], |
| 8 | ) |
| 9 | |
| 10 | executable( |
| 11 | 'ecc_main', |
| 12 | [ |
| 13 | 'ecc_main.cpp', |
| 14 | 'ecc_manager.cpp', |
| 15 | ], |
| 16 | dependencies: [ |
| 17 | dependency('sdbusplus'), |
| 18 | dependency('sdeventplus'), |
| 19 | dependency('phosphor-dbus-interfaces'), |
| 20 | dependency('phosphor-logging'), |
| 21 | ], |
| 22 | install: true, |
| 23 | install_dir: get_option('bindir') |
| 24 | ) |
| 25 | |
| 26 | install_data(sources : 'maxlog.conf', install_dir : '/etc/ecc') |
| 27 | |
| 28 | conf_data = configuration_data() |
| 29 | conf_data.set('BUSNAME', '"xyz.openbmc_project.memory.ECC"') |
| 30 | conf_data.set('OBJROOT', '"/xyz/openbmc_project/metrics/memory/"') |
| 31 | conf_data.set('OBJPATH', '"/xyz/openbmc_project/metrics/memory/BmcECC"') |
| 32 | conf_data.set('sysfsRootPath', '"/sys/devices/system/edac/mc/mc0/"') |
| 33 | conf_data.set('sysfsEDACReportPath', '"/sys/module/edac_core/parameters/edac_report"') |
| 34 | |
| 35 | configure_file(output : 'config.h', |
| 36 | configuration : conf_data) |
| 37 | |
George Hung | 0841f8a | 2020-09-28 11:12:05 +0800 | [diff] [blame^] | 38 | systemd = dependency('systemd') |
| 39 | conf_data = configuration_data() |
| 40 | conf_data.set('bindir', get_option('prefix') / get_option('bindir')) |
| 41 | configure_file( |
| 42 | input: 'phosphor-ecc.service.in', |
| 43 | output: 'phosphor-ecc.service', |
| 44 | configuration: conf_data, |
| 45 | install: true, |
| 46 | install_dir: systemd.get_pkgconfig_variable('systemdsystemunitdir')) |