blob: 30e2fd2b235130557bc283bf413d163db50c979c [file] [log] [blame]
Will Lianga1d42022019-06-13 14:17:12 +08001project(
2 'phosphor-ecc',
3 'cpp',
4 version: '1.0',
5 default_options: [
6 'cpp_std=c++17',
7 ],
8)
9
10executable(
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
26install_data(sources : 'maxlog.conf', install_dir : '/etc/ecc')
27
28conf_data = configuration_data()
29conf_data.set('BUSNAME', '"xyz.openbmc_project.memory.ECC"')
30conf_data.set('OBJROOT', '"/xyz/openbmc_project/metrics/memory/"')
31conf_data.set('OBJPATH', '"/xyz/openbmc_project/metrics/memory/BmcECC"')
32conf_data.set('sysfsRootPath', '"/sys/devices/system/edac/mc/mc0/"')
33conf_data.set('sysfsEDACReportPath', '"/sys/module/edac_core/parameters/edac_report"')
34
35configure_file(output : 'config.h',
36 configuration : conf_data)
37
George Hung0841f8a2020-09-28 11:12:05 +080038systemd = dependency('systemd')
39conf_data = configuration_data()
40conf_data.set('bindir', get_option('prefix') / get_option('bindir'))
41configure_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'))