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, |
| 11 | sdeventplus_dep |
| 12 | ] |
| 13 | |
| 14 | sources = ['main.cpp'] |
| 15 | |
| 16 | if 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', |
| 43 | 'json/actions/timer_based_actions.cpp', |
| 44 | 'json/utils/flight_recorder.cpp', |
| 45 | 'json/utils/modifier.cpp', |
| 46 | 'json/utils/pcie_card_metadata.cpp', |
| 47 | 'json/triggers/init.cpp', |
| 48 | 'json/triggers/parameter.cpp', |
| 49 | 'json/triggers/signal.cpp', |
| 50 | 'json/triggers/timer.cpp' |
| 51 | ] |
| 52 | else |
| 53 | fan_zone_defs_cpp_dep = custom_target( |
| 54 | 'fan_zone_defs.cpp', |
| 55 | input: files( |
| 56 | './gen-fan-zone-defs.py', |
| 57 | conf.get_unquoted('FAN_DEF_YAML_FILE'), |
| 58 | conf.get_unquoted('FAN_ZONE_YAML_FILE'), |
| 59 | conf.get_unquoted('ZONE_EVENTS_YAML_FILE'), |
| 60 | conf.get_unquoted('ZONE_CONDITIONS_YAML_FILE') |
| 61 | ), |
| 62 | command: [ |
| 63 | python_prog, '@INPUT0@', |
| 64 | '-f','@INPUT1@', |
| 65 | '-z','@INPUT2@', |
| 66 | '-e','@INPUT3@', |
| 67 | '-c','@INPUT4@', |
| 68 | '-o', 'control' |
| 69 | ], |
| 70 | output: 'fan_zone_defs.cpp' |
| 71 | ) |
| 72 | |
| 73 | sources += [ |
| 74 | 'actions.cpp', |
| 75 | 'argument.cpp', |
| 76 | 'fan.cpp', |
| 77 | fan_zone_defs_cpp_dep, |
| 78 | 'manager.cpp', |
| 79 | 'preconditions.cpp', |
| 80 | 'triggers.cpp', |
| 81 | 'utility.cpp', |
| 82 | 'zone.cpp' |
| 83 | ] |
| 84 | |
| 85 | endif |
| 86 | |
| 87 | phosphor_fan_control_include_directories = include_directories(include_dirs) |
| 88 | phosphor_fan_control = executable( |
| 89 | 'phosphor-fan-control', |
| 90 | sources, |
| 91 | dependencies:deps, |
| 92 | implicit_include_directories: false, |
| 93 | include_directories: phosphor_fan_control_include_directories, |
| 94 | install: true |
| 95 | ) |
| 96 | |
| 97 | fanctl = executable( |
| 98 | 'fanctl', |
| 99 | 'fanctl.cpp', |
| 100 | dependencies: [ |
| 101 | cli11_dep, |
| 102 | fmt_dep, |
| 103 | sdbusplus_dep |
| 104 | ], |
| 105 | include_directories: phosphor_fan_control_include_directories, |
| 106 | install: true |
| 107 | ) |