blob: e5a62313fe3c5ed6f1a64f59a484943f4c479414 [file] [log] [blame]
Mike Cappsa0819562022-06-13 10:17:10 -04001
2include_dirs=[
3 '.',
4 '..'
5]
6
7deps=[
8 phosphor_dbus_interfaces_dep,
9 phosphor_logging_dep,
10 sdbusplus_dep,
11 sdeventplus_dep
12]
13
14sources = ['main.cpp']
15
16if conf.has('CONTROL_USE_JSON')
17 deps += json_dep
18 include_dirs += [
19 './json',
20 './json/actions',
21 './json/triggers'
22 ]
23 sources += [
24 'json/dbus_zone.cpp',
25 'json/event.cpp',
26 'json/fan.cpp',
27 'json/group.cpp',
28 'json/manager.cpp',
29 'json/profile.cpp',
30 'json/zone.cpp',
31 'json/actions/count_state_floor.cpp',
32 'json/actions/count_state_target.cpp',
33 'json/actions/default_floor.cpp',
34 'json/actions/get_managed_objects.cpp',
35 'json/actions/mapped_floor.cpp',
36 'json/actions/missing_owner_target.cpp',
37 'json/actions/net_target_decrease.cpp',
38 'json/actions/net_target_increase.cpp',
39 'json/actions/override_fan_target.cpp',
40 'json/actions/pcie_card_floors.cpp',
41 'json/actions/request_target_base.cpp',
42 'json/actions/set_parameter_from_group_max.cpp',
chaul.amperebb29bb72022-08-11 08:01:05 +000043 'json/actions/target_from_group_max.cpp',
Mike Cappsa0819562022-06-13 10:17:10 -040044 'json/actions/timer_based_actions.cpp',
45 'json/utils/flight_recorder.cpp',
46 'json/utils/modifier.cpp',
47 'json/utils/pcie_card_metadata.cpp',
48 'json/triggers/init.cpp',
49 'json/triggers/parameter.cpp',
50 'json/triggers/signal.cpp',
51 'json/triggers/timer.cpp'
52 ]
53else
54 fan_zone_defs_cpp_dep = custom_target(
55 'fan_zone_defs.cpp',
56 input: files(
57 './gen-fan-zone-defs.py',
58 conf.get_unquoted('FAN_DEF_YAML_FILE'),
59 conf.get_unquoted('FAN_ZONE_YAML_FILE'),
60 conf.get_unquoted('ZONE_EVENTS_YAML_FILE'),
61 conf.get_unquoted('ZONE_CONDITIONS_YAML_FILE')
62 ),
63 command: [
64 python_prog, '@INPUT0@',
65 '-f','@INPUT1@',
66 '-z','@INPUT2@',
67 '-e','@INPUT3@',
68 '-c','@INPUT4@',
69 '-o', 'control'
70 ],
71 output: 'fan_zone_defs.cpp'
72 )
73
74 sources += [
75 'actions.cpp',
76 'argument.cpp',
77 'fan.cpp',
78 fan_zone_defs_cpp_dep,
79 'manager.cpp',
80 'preconditions.cpp',
81 'triggers.cpp',
82 'utility.cpp',
83 'zone.cpp'
84 ]
85
86endif
87
88phosphor_fan_control_include_directories = include_directories(include_dirs)
89phosphor_fan_control = executable(
90 'phosphor-fan-control',
91 sources,
92 dependencies:deps,
93 implicit_include_directories: false,
94 include_directories: phosphor_fan_control_include_directories,
95 install: true
96)
97
98fanctl = executable(
99 'fanctl',
100 'fanctl.cpp',
101 dependencies: [
102 cli11_dep,
103 fmt_dep,
104 sdbusplus_dep
105 ],
106 include_directories: phosphor_fan_control_include_directories,
107 install: true
108)