blob: d708ccaeaf8fc49d0af781d026a35b4fd31ff41c [file] [log] [blame]
Mike Cappsa0819562022-06-13 10:17:10 -04001phosphor_fan_monitor_include_directories = include_directories(
2 '.',
3 '..'
4)
5
6sources=[
7 'argument.cpp',
8 'conditions.cpp',
9 'fan.cpp',
10 'fan_error.cpp',
11 'json_parser.cpp',
12 'logging.cpp',
13 'main.cpp',
14 'power_interface.cpp',
15 'system.cpp',
16 'tach_sensor.cpp',
17 '../hwmon_ffdc.cpp'
18]
19
20deps=[
21 json_dep,
22 phosphor_dbus_interfaces_dep,
23 phosphor_logging_dep,
24 sdbusplus_dep,
25 sdeventplus_dep
26]
27
28# Only needed for YAML config
29if get_option('json-config').disabled()
30 fan_monitor_defs_cpp_dep = custom_target(
31 'fan_monitor_defs.cpp',
32 input: files(
33 './gen-fan-monitor-defs.py',
34 conf.get_unquoted('FAN_MONITOR_YAML_FILE'),
35 ),
36 command: [
37 python_prog, '@INPUT0@',
38 '-m','@INPUT1@',
39 '-o','monitor'
40 ],
41 output: 'fan_monitor_defs.cpp'
42 )
43
44 sources += fan_monitor_defs_cpp_dep
45endif
46
47phosphor_fan_monitor = executable(
48 'phosphor-fan-monitor',
49 sources,
50 dependencies: deps,
51 implicit_include_directories: false,
52 include_directories: phosphor_fan_monitor_include_directories,
53 install: true
54)
55
56if(get_option('tests').enabled())
57 subdir('test')
58endif
59