blob: d0736ab58d75e334425ddb8ba5fe465255a7748e [file] [log] [blame]
Will Lianga1d42022019-06-13 14:17:12 +08001project(
2 'phosphor-ecc',
3 'cpp',
4 version: '1.0',
5 default_options: [
Patrick Williams74146672022-09-21 14:58:57 -05006 'cpp_std=c++20',
Will Lianga1d42022019-06-13 14:17:12 +08007 ],
Patrick Williamsc0b4eae2023-04-12 08:05:58 -05008 meson_version: '>=0.58.0',
Will Lianga1d42022019-06-13 14:17:12 +08009)
10
11executable(
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
27install_data(sources : 'maxlog.conf', install_dir : '/etc/ecc')
28
29conf_data = configuration_data()
30conf_data.set('BUSNAME', '"xyz.openbmc_project.memory.ECC"')
31conf_data.set('OBJROOT', '"/xyz/openbmc_project/metrics/memory/"')
32conf_data.set('OBJPATH', '"/xyz/openbmc_project/metrics/memory/BmcECC"')
33conf_data.set('sysfsRootPath', '"/sys/devices/system/edac/mc/mc0/"')
34conf_data.set('sysfsEDACReportPath', '"/sys/module/edac_core/parameters/edac_report"')
35
36configure_file(output : 'config.h',
37 configuration : conf_data)
38
George Hung0841f8a2020-09-28 11:12:05 +080039systemd = dependency('systemd')
40conf_data = configuration_data()
41conf_data.set('bindir', get_option('prefix') / get_option('bindir'))
42configure_file(
43 input: 'phosphor-ecc.service.in',
44 output: 'phosphor-ecc.service',
45 configuration: conf_data,
46 install: true,
Patrick Williamsc0b4eae2023-04-12 08:05:58 -050047 install_dir: systemd.get_variable('systemdsystemunitdir'))