Mike Capps | a081956 | 2022-06-13 10:17:10 -0400 | [diff] [blame] | 1 | |
| 2 | include_dirs=[ |
| 3 | '.', |
| 4 | '..' |
| 5 | ] |
| 6 | |
| 7 | deps=[ |
| 8 | phosphor_dbus_interfaces_dep, |
| 9 | phosphor_logging_dep, |
| 10 | sdbusplus_dep, |
Patrick Williams | 1a56c2b | 2023-07-17 12:07:23 -0500 | [diff] [blame] | 11 | sdeventplus_dep, |
| 12 | cereal_dep, |
Mike Capps | a081956 | 2022-06-13 10:17:10 -0400 | [diff] [blame] | 13 | ] |
| 14 | |
| 15 | sources = ['main.cpp'] |
| 16 | |
| 17 | if conf.has('CONTROL_USE_JSON') |
Patrick Williams | ef17a25 | 2023-12-07 14:53:06 -0600 | [diff] [blame] | 18 | deps += nlohmann_json_dep |
Mike Capps | a081956 | 2022-06-13 10:17:10 -0400 | [diff] [blame] | 19 | include_dirs += [ |
| 20 | './json', |
| 21 | './json/actions', |
| 22 | './json/triggers' |
| 23 | ] |
| 24 | sources += [ |
| 25 | 'json/dbus_zone.cpp', |
| 26 | 'json/event.cpp', |
| 27 | 'json/fan.cpp', |
| 28 | 'json/group.cpp', |
| 29 | 'json/manager.cpp', |
| 30 | 'json/profile.cpp', |
| 31 | 'json/zone.cpp', |
| 32 | 'json/actions/count_state_floor.cpp', |
| 33 | 'json/actions/count_state_target.cpp', |
| 34 | 'json/actions/default_floor.cpp', |
| 35 | 'json/actions/get_managed_objects.cpp', |
| 36 | 'json/actions/mapped_floor.cpp', |
| 37 | 'json/actions/missing_owner_target.cpp', |
| 38 | 'json/actions/net_target_decrease.cpp', |
| 39 | 'json/actions/net_target_increase.cpp', |
| 40 | 'json/actions/override_fan_target.cpp', |
| 41 | 'json/actions/pcie_card_floors.cpp', |
| 42 | 'json/actions/request_target_base.cpp', |
| 43 | 'json/actions/set_parameter_from_group_max.cpp', |
chaul.ampere | bb29bb7 | 2022-08-11 08:01:05 +0000 | [diff] [blame] | 44 | 'json/actions/target_from_group_max.cpp', |
Mike Capps | a081956 | 2022-06-13 10:17:10 -0400 | [diff] [blame] | 45 | 'json/actions/timer_based_actions.cpp', |
| 46 | 'json/utils/flight_recorder.cpp', |
| 47 | 'json/utils/modifier.cpp', |
| 48 | 'json/utils/pcie_card_metadata.cpp', |
| 49 | 'json/triggers/init.cpp', |
| 50 | 'json/triggers/parameter.cpp', |
| 51 | 'json/triggers/signal.cpp', |
| 52 | 'json/triggers/timer.cpp' |
| 53 | ] |
| 54 | else |
| 55 | fan_zone_defs_cpp_dep = custom_target( |
| 56 | 'fan_zone_defs.cpp', |
| 57 | input: files( |
| 58 | './gen-fan-zone-defs.py', |
| 59 | conf.get_unquoted('FAN_DEF_YAML_FILE'), |
| 60 | conf.get_unquoted('FAN_ZONE_YAML_FILE'), |
| 61 | conf.get_unquoted('ZONE_EVENTS_YAML_FILE'), |
| 62 | conf.get_unquoted('ZONE_CONDITIONS_YAML_FILE') |
| 63 | ), |
| 64 | command: [ |
| 65 | python_prog, '@INPUT0@', |
| 66 | '-f','@INPUT1@', |
| 67 | '-z','@INPUT2@', |
| 68 | '-e','@INPUT3@', |
| 69 | '-c','@INPUT4@', |
| 70 | '-o', 'control' |
| 71 | ], |
| 72 | output: 'fan_zone_defs.cpp' |
| 73 | ) |
| 74 | |
| 75 | sources += [ |
| 76 | 'actions.cpp', |
Mike Capps | a081956 | 2022-06-13 10:17:10 -0400 | [diff] [blame] | 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 | |
| 86 | endif |
| 87 | |
| 88 | phosphor_fan_control_include_directories = include_directories(include_dirs) |
| 89 | phosphor_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 | |
| 98 | fanctl = executable( |
| 99 | 'fanctl', |
| 100 | 'fanctl.cpp', |
| 101 | dependencies: [ |
| 102 | cli11_dep, |
Patrick Williams | ef17a25 | 2023-12-07 14:53:06 -0600 | [diff] [blame] | 103 | nlohmann_json_dep, |
Patrick Williams | fc4be0d | 2023-07-17 12:18:53 -0500 | [diff] [blame] | 104 | phosphor_logging_dep, |
Patrick Williams | 16e512d | 2023-07-17 12:14:25 -0500 | [diff] [blame] | 105 | sdbusplus_dep, |
Mike Capps | a081956 | 2022-06-13 10:17:10 -0400 | [diff] [blame] | 106 | ], |
| 107 | include_directories: phosphor_fan_control_include_directories, |
| 108 | install: true |
| 109 | ) |