Michael Spang | e772be0 | 2021-04-09 14:03:22 -0400 | [diff] [blame] | 1 | # Copyright (c) 2021 Project CHIP Authors |
| 2 | # |
| 3 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | # you may not use this file except in compliance with the License. |
| 5 | # You may obtain a copy of the License at |
| 6 | # |
| 7 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | # |
| 9 | # Unless required by applicable law or agreed to in writing, software |
| 10 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | # See the License for the specific language governing permissions and |
| 13 | # limitations under the License. |
| 14 | |
Michael Spang | 446e7ad | 2021-06-14 14:55:51 -0400 | [diff] [blame] | 15 | import("//build_overrides/build.gni") |
Michael Spang | e772be0 | 2021-04-09 14:03:22 -0400 | [diff] [blame] | 16 | import("//build_overrides/chip.gni") |
Andrei Litvin | 559c7d5 | 2022-10-21 13:38:11 -0400 | [diff] [blame] | 17 | import("${chip_root}/build/chip/chip_codegen.gni") |
Karsten Sperling | 567b797 | 2023-05-13 02:22:28 +1200 | [diff] [blame] | 18 | import("${chip_root}/src/lib/core/core.gni") |
Markus Becker | eddf2b4 | 2021-12-02 08:16:46 +0100 | [diff] [blame] | 19 | import("${chip_root}/src/platform/python.gni") |
Michael Spang | e772be0 | 2021-04-09 14:03:22 -0400 | [diff] [blame] | 20 | |
Michael Spang | e772be0 | 2021-04-09 14:03:22 -0400 | [diff] [blame] | 21 | _app_root = get_path_info(".", "abspath") |
| 22 | |
| 23 | # Defines a source_set for CHIP data model. |
| 24 | # |
| 25 | # Arguments: |
| 26 | # zap_pregenerated_dir |
| 27 | # Path to the ZAP "gen" dir. |
| 28 | # |
Michael Spang | 9e28288 | 2021-04-26 15:54:03 -0400 | [diff] [blame] | 29 | # zap_file |
| 30 | # Path to the ZAP input file. |
| 31 | # |
Andrei Litvin | 559c7d5 | 2022-10-21 13:38:11 -0400 | [diff] [blame] | 32 | # idl |
| 33 | # Path to the .matter IDL corresponding to the zap file. This is for |
| 34 | # dependencies on build-time code generation. |
| 35 | # |
Michael Spang | e772be0 | 2021-04-09 14:03:22 -0400 | [diff] [blame] | 36 | # Forwards all the remaining variables to the source_set. |
| 37 | # |
| 38 | template("chip_data_model") { |
| 39 | _data_model_name = target_name |
| 40 | |
Boris Zbarsky | 3f0e043 | 2023-03-31 15:00:36 -0400 | [diff] [blame] | 41 | declare_args() { |
| 42 | # Allow building ota-requestor-app with a non-spec-compliant floor |
| 43 | # (i.e. smaller than 2 minutes) for action delays. |
| 44 | non_spec_compliant_ota_action_delay_floor = -1 |
C Freeman | 2e97ec0 | 2023-08-21 17:31:51 -0400 | [diff] [blame] | 45 | time_sync_enable_tsc_feature = 1 |
Boris Zbarsky | 3f0e043 | 2023-03-31 15:00:36 -0400 | [diff] [blame] | 46 | } |
| 47 | |
Andrei Litvin | 559c7d5 | 2022-10-21 13:38:11 -0400 | [diff] [blame] | 48 | if (defined(invoker.idl)) { |
| 49 | _idl = invoker.idl |
| 50 | } else { |
| 51 | # Assume that IDL name is the same as the zap file name, but instead of |
| 52 | # '.zap' use '.matter' as extension. This is currently the case in the |
| 53 | # sample apps, but may change in the future |
Andrei Litvin | 559c7d5 | 2022-10-21 13:38:11 -0400 | [diff] [blame] | 54 | _idl = string_replace(invoker.zap_file, ".zap", ".matter") |
| 55 | } |
| 56 | |
Michael Spang | e772be0 | 2021-04-09 14:03:22 -0400 | [diff] [blame] | 57 | config("${_data_model_name}_config") { |
| 58 | include_dirs = [] |
| 59 | |
| 60 | if (defined(invoker.zap_pregenerated_dir)) { |
| 61 | include_dirs += [ "${invoker.zap_pregenerated_dir}/.." ] |
| 62 | } |
| 63 | } |
| 64 | |
Andrei Litvin | 89c6fb6 | 2023-01-17 21:29:11 -0500 | [diff] [blame] | 65 | chip_zapgen("${_data_model_name}_zapgen") { |
| 66 | input = rebase_path(invoker.zap_file) |
| 67 | generator = "app-templates" |
| 68 | |
| 69 | outputs = [ |
| 70 | "zap-generated/access.h", |
| 71 | "zap-generated/gen_config.h", |
| 72 | "zap-generated/endpoint_config.h", |
Andrei Litvin | 89c6fb6 | 2023-01-17 21:29:11 -0500 | [diff] [blame] | 73 | ] |
| 74 | |
| 75 | if (chip_code_pre_generated_directory == "") { |
| 76 | prune_outputs = [] |
| 77 | } |
| 78 | |
| 79 | if (chip_controller) { |
| 80 | outputs += [ "zap-generated/CHIPClusters.h" ] |
| 81 | } else { |
| 82 | if (defined(prune_outputs)) { |
| 83 | prune_outputs += [ "zap-generated/CHIPClusters.h" ] |
| 84 | } |
| 85 | } |
| 86 | |
| 87 | # TODO: It is unclear here why `zap_pregenerated_dir` has any relevance |
| 88 | # in including IMClusterCommandHandler or not. |
| 89 | # |
| 90 | # This logic has been carried over from previous code during compile |
| 91 | # time codegen addition, however the rationale of why pregenerated |
| 92 | # dir controls IMClusterCommandHandler needs to be explained and |
| 93 | # potentially controlled by a clearer variable (is this for controllers? |
| 94 | # is this during app compile but not others? I am unclear what |
| 95 | # zap_pregenerated_dir is supposed to convey. Existence of a directory |
| 96 | # does not obviously map to "need command handler cpp compiled in"). |
| 97 | if (defined(invoker.zap_pregenerated_dir)) { |
| 98 | outputs += [ "zap-generated/IMClusterCommandHandler.cpp" ] |
| 99 | } else { |
| 100 | if (defined(prune_outputs)) { |
| 101 | prune_outputs += [ "zap-generated/IMClusterCommandHandler.cpp" ] |
| 102 | } |
| 103 | } |
| 104 | |
| 105 | public_configs = [ ":${_data_model_name}_config" ] |
| 106 | |
| 107 | if (!defined(deps)) { |
| 108 | deps = [] |
| 109 | } |
| 110 | |
| 111 | deps += [ "${chip_root}/src/app" ] |
| 112 | } |
| 113 | |
Andrei Litvin | a715884 | 2022-11-30 10:11:41 -0500 | [diff] [blame] | 114 | chip_codegen("${_data_model_name}_codegen") { |
| 115 | input = _idl |
| 116 | generator = "cpp-app" |
| 117 | |
| 118 | outputs = [ |
| 119 | "app/PluginApplicationCallbacks.h", |
| 120 | "app/callback-stub.cpp", |
| 121 | ] |
| 122 | |
| 123 | public_configs = [ ":${_data_model_name}_config" ] |
| 124 | |
| 125 | if (!defined(deps)) { |
| 126 | deps = [] |
| 127 | } |
| 128 | |
Andrei Litvin | 89c6fb6 | 2023-01-17 21:29:11 -0500 | [diff] [blame] | 129 | deps += [ |
| 130 | ":${_data_model_name}_zapgen", |
| 131 | "${chip_root}/src/app/common:cluster-objects", |
| 132 | ] |
Andrei Litvin | a715884 | 2022-11-30 10:11:41 -0500 | [diff] [blame] | 133 | } |
| 134 | |
Michael Spang | e772be0 | 2021-04-09 14:03:22 -0400 | [diff] [blame] | 135 | source_set(_data_model_name) { |
| 136 | forward_variables_from(invoker, |
| 137 | "*", |
| 138 | [ |
| 139 | "zap_pregenerated_dir", |
Michael Spang | 9e28288 | 2021-04-26 15:54:03 -0400 | [diff] [blame] | 140 | "zap_file", |
Vivien Nicolas | 92e3683 | 2021-05-01 00:38:25 +0200 | [diff] [blame] | 141 | "is_server", |
Damian Królik | 2cb314a | 2023-07-12 22:16:49 +0200 | [diff] [blame] | 142 | "external_clusters", |
Michael Spang | e772be0 | 2021-04-09 14:03:22 -0400 | [diff] [blame] | 143 | ]) |
| 144 | |
| 145 | if (!defined(sources)) { |
| 146 | sources = [] |
| 147 | } |
| 148 | |
Andrei Litvin | 89c6fb6 | 2023-01-17 21:29:11 -0500 | [diff] [blame] | 149 | if (!defined(is_server)) { |
| 150 | is_server = false |
Andrei Litvin | a715884 | 2022-11-30 10:11:41 -0500 | [diff] [blame] | 151 | } |
Andrei Litvin | 559c7d5 | 2022-10-21 13:38:11 -0400 | [diff] [blame] | 152 | |
Michael Spang | e772be0 | 2021-04-09 14:03:22 -0400 | [diff] [blame] | 153 | sources += [ |
| 154 | "${_app_root}/clusters/barrier-control-server/barrier-control-server.h", |
Boris Zbarsky | 04c20f6 | 2022-12-18 10:09:13 -0500 | [diff] [blame] | 155 | "${_app_root}/clusters/basic-information/basic-information.h", |
Michael Spang | e772be0 | 2021-04-09 14:03:22 -0400 | [diff] [blame] | 156 | "${_app_root}/clusters/color-control-server/color-control-server.h", |
| 157 | "${_app_root}/clusters/door-lock-server/door-lock-server.h", |
| 158 | "${_app_root}/clusters/groups-server/groups-server.h", |
mkardous-silabs | 1fa214d | 2023-05-16 16:51:28 -0400 | [diff] [blame] | 159 | "${_app_root}/clusters/icd-management-server/icd-management-server.h", |
eve-cxrp | a3e30a3 | 2021-09-23 18:31:36 +0200 | [diff] [blame] | 160 | "${_app_root}/clusters/identify-server/identify-server.h", |
Michael Spang | e772be0 | 2021-04-09 14:03:22 -0400 | [diff] [blame] | 161 | "${_app_root}/clusters/level-control/level-control.h", |
Michael Spang | e772be0 | 2021-04-09 14:03:22 -0400 | [diff] [blame] | 162 | "${_app_root}/clusters/on-off-server/on-off-server.h", |
lpbeliveau-silabs | 5dea83e | 2023-05-30 19:23:04 -0400 | [diff] [blame] | 163 | "${_app_root}/clusters/scenes-server/ExtensionFieldSets.h", |
| 164 | "${_app_root}/clusters/scenes-server/ExtensionFieldSetsImpl.h", |
| 165 | "${_app_root}/clusters/scenes-server/SceneTable.h", |
| 166 | "${_app_root}/clusters/scenes-server/SceneTableImpl.h", |
| 167 | "${_app_root}/clusters/scenes-server/scenes-server.h", |
Damian Królik | dada1be | 2021-04-12 22:56:05 +0200 | [diff] [blame] | 168 | "${_app_root}/util/DataModelHandler.cpp", |
Michael Spang | 35b5ce3 | 2021-06-16 10:05:06 -0400 | [diff] [blame] | 169 | "${_app_root}/util/attribute-size-util.cpp", |
Michael Spang | e772be0 | 2021-04-09 14:03:22 -0400 | [diff] [blame] | 170 | "${_app_root}/util/attribute-storage.cpp", |
| 171 | "${_app_root}/util/attribute-table.cpp", |
| 172 | "${_app_root}/util/binding-table.cpp", |
Jiacheng Guo | f8f54e9 | 2022-02-22 03:35:48 +0800 | [diff] [blame] | 173 | "${_app_root}/util/binding-table.h", |
Michael Spang | e772be0 | 2021-04-09 14:03:22 -0400 | [diff] [blame] | 174 | "${_app_root}/util/ember-compatibility-functions.cpp", |
Andrei Litvin | 5030df4 | 2022-11-02 14:02:46 -0400 | [diff] [blame] | 175 | "${_app_root}/util/generic-callback-stubs.cpp", |
Michael Spang | e772be0 | 2021-04-09 14:03:22 -0400 | [diff] [blame] | 176 | "${_app_root}/util/message.cpp", |
Marc Lepage | c7b4913 | 2022-03-23 17:28:47 -0400 | [diff] [blame] | 177 | "${_app_root}/util/privilege-storage.cpp", |
Michael Spang | e772be0 | 2021-04-09 14:03:22 -0400 | [diff] [blame] | 178 | "${_app_root}/util/util.cpp", |
Andrei Litvin | 1ae045e | 2021-08-25 11:56:29 -0400 | [diff] [blame] | 179 | "${chip_root}/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp", |
Michael Spang | e772be0 | 2021-04-09 14:03:22 -0400 | [diff] [blame] | 180 | ] |
| 181 | |
Andrei Litvin | 0e08265 | 2022-07-22 10:23:35 -0400 | [diff] [blame] | 182 | if (defined(invoker.zap_file)) { |
Karsten Sperling | 567b797 | 2023-05-13 02:22:28 +1200 | [diff] [blame] | 183 | _zap_file = rebase_path(invoker.zap_file, root_build_dir) |
Damian Królik | 2cb314a | 2023-07-12 22:16:49 +0200 | [diff] [blame] | 184 | _script_args = [ |
| 185 | "--zap_file", |
| 186 | _zap_file, |
| 187 | ] |
| 188 | if (defined(invoker.external_clusters)) { |
| 189 | _script_args += [ "--external-clusters" ] |
| 190 | _script_args += invoker.external_clusters |
| 191 | } |
Karsten Sperling | 567b797 | 2023-05-13 02:22:28 +1200 | [diff] [blame] | 192 | _cluster_sources = exec_script("${_app_root}/zap_cluster_list.py", |
Damian Królik | 2cb314a | 2023-07-12 22:16:49 +0200 | [diff] [blame] | 193 | _script_args, |
Michael Spang | 9e28288 | 2021-04-26 15:54:03 -0400 | [diff] [blame] | 194 | "list lines", |
| 195 | [ invoker.zap_file ]) |
| 196 | } |
| 197 | |
Junior Martinez | e6f610b | 2023-07-17 21:04:30 -0400 | [diff] [blame] | 198 | if (!defined(deps)) { |
| 199 | deps = [] |
| 200 | } |
| 201 | |
C Freeman | 2e97ec0 | 2023-08-21 17:31:51 -0400 | [diff] [blame] | 202 | if (!defined(cflags)) { |
| 203 | cflags = [] |
| 204 | } |
| 205 | |
C Freeman | 9853ecf | 2023-09-26 15:02:44 -0400 | [diff] [blame] | 206 | if (!defined(defines)) { |
| 207 | defines = [] |
| 208 | } |
| 209 | |
Michael Spang | 9e28288 | 2021-04-26 15:54:03 -0400 | [diff] [blame] | 210 | foreach(cluster, _cluster_sources) { |
Damian Królik | 2cb314a | 2023-07-12 22:16:49 +0200 | [diff] [blame] | 211 | if (cluster == "door-lock-server") { |
Erwin Pan | d64b0fd | 2022-07-12 20:57:47 +0800 | [diff] [blame] | 212 | sources += [ |
| 213 | "${_app_root}/clusters/${cluster}/door-lock-server-callback.cpp", |
| 214 | "${_app_root}/clusters/${cluster}/door-lock-server.cpp", |
| 215 | ] |
du48s03 | 09ba9fb | 2021-10-29 17:41:53 -0700 | [diff] [blame] | 216 | } else if (cluster == "mode-select-server") { |
| 217 | sources += [ |
| 218 | "${_app_root}/clusters/${cluster}/${cluster}.cpp", |
du48s03 | ca811e0 | 2021-11-09 13:48:48 -0800 | [diff] [blame] | 219 | "${_app_root}/clusters/${cluster}/supported-modes-manager.h", |
du48s03 | 09ba9fb | 2021-10-29 17:41:53 -0700 | [diff] [blame] | 220 | ] |
Rohit Jadhav | 701fcb2 | 2023-07-19 14:18:26 +0530 | [diff] [blame] | 221 | } else if (cluster == "temperature-control-server") { |
| 222 | sources += [ |
| 223 | "${_app_root}/clusters/${cluster}/${cluster}.cpp", |
| 224 | "${_app_root}/clusters/${cluster}/supported-temperature-levels-manager.h", |
| 225 | ] |
William | 4eaace4 | 2023-07-21 13:15:35 +0100 | [diff] [blame] | 226 | } else if (cluster == "mode-base-server") { |
| 227 | sources += [ |
| 228 | "${_app_root}/clusters/mode-base-server/mode-base-cluster-objects.cpp", |
| 229 | "${_app_root}/clusters/mode-base-server/mode-base-cluster-objects.h", |
| 230 | "${_app_root}/clusters/mode-base-server/mode-base-server.cpp", |
| 231 | "${_app_root}/clusters/mode-base-server/mode-base-server.h", |
| 232 | ] |
chrisdecenzo | 2b0679a | 2021-12-02 17:47:43 -0800 | [diff] [blame] | 233 | } else if (cluster == "application-launcher-server") { |
| 234 | sources += [ |
chrisdecenzo | 0c94a80 | 2022-01-27 09:05:43 -0800 | [diff] [blame] | 235 | "${_app_root}/app-platform/ContentApp.cpp", |
| 236 | "${_app_root}/app-platform/ContentAppPlatform.cpp", |
chrisdecenzo | 2b0679a | 2021-12-02 17:47:43 -0800 | [diff] [blame] | 237 | "${_app_root}/clusters/${cluster}/${cluster}.cpp", |
chrisdecenzo | 2b0679a | 2021-12-02 17:47:43 -0800 | [diff] [blame] | 238 | ] |
Timothy Maes | 628e86a | 2022-01-12 18:38:44 +0100 | [diff] [blame] | 239 | } else if (cluster == "ota-requestor") { |
| 240 | sources += [ |
| 241 | # TODO - align name of folder ? |
| 242 | "${_app_root}/clusters/${cluster}/${cluster}-server.cpp", |
| 243 | "${_app_root}/clusters/${cluster}/BDXDownloader.cpp", |
| 244 | "${_app_root}/clusters/${cluster}/BDXDownloader.h", |
Carol Yang | 5b62cea | 2022-04-04 17:48:08 -0700 | [diff] [blame] | 245 | "${_app_root}/clusters/${cluster}/DefaultOTARequestor.cpp", |
Carol Yang | 04f1acd | 2022-04-05 01:44:44 -0700 | [diff] [blame] | 246 | "${_app_root}/clusters/${cluster}/DefaultOTARequestorDriver.cpp", |
Damian Królik | aa17b2f | 2022-03-09 14:13:29 +0100 | [diff] [blame] | 247 | "${_app_root}/clusters/${cluster}/DefaultOTARequestorStorage.cpp", |
| 248 | "${_app_root}/clusters/${cluster}/DefaultOTARequestorStorage.h", |
Shubham Patil | 47cf069 | 2022-03-31 08:49:01 +0530 | [diff] [blame] | 249 | "${_app_root}/clusters/${cluster}/DefaultOTARequestorUserConsent.h", |
Carol Yang | 535c6c8 | 2022-03-08 09:44:03 -0800 | [diff] [blame] | 250 | "${_app_root}/clusters/${cluster}/ExtendedOTARequestorDriver.cpp", |
Damian Królik | aa17b2f | 2022-03-09 14:13:29 +0100 | [diff] [blame] | 251 | "${_app_root}/clusters/${cluster}/OTARequestorStorage.h", |
Damian Królik | 3030a19 | 2022-06-22 04:49:37 +0200 | [diff] [blame] | 252 | "${_app_root}/clusters/${cluster}/OTATestEventTriggerDelegate.cpp", |
| 253 | "${_app_root}/clusters/${cluster}/OTATestEventTriggerDelegate.h", |
Timothy Maes | 628e86a | 2022-01-12 18:38:44 +0100 | [diff] [blame] | 254 | ] |
Jiacheng Guo | 59a61a3 | 2022-01-20 21:08:10 +0800 | [diff] [blame] | 255 | } else if (cluster == "bindings") { |
| 256 | sources += [ |
| 257 | "${_app_root}/clusters/${cluster}/${cluster}.cpp", |
| 258 | "${_app_root}/clusters/${cluster}/BindingManager.cpp", |
| 259 | "${_app_root}/clusters/${cluster}/BindingManager.h", |
Jiacheng Guo | 6f9fa8e | 2022-02-08 04:43:11 +0800 | [diff] [blame] | 260 | "${_app_root}/clusters/${cluster}/PendingNotificationMap.cpp", |
| 261 | "${_app_root}/clusters/${cluster}/PendingNotificationMap.h", |
Jiacheng Guo | 59a61a3 | 2022-01-20 21:08:10 +0800 | [diff] [blame] | 262 | ] |
fesseha-eve | fa07cc9 | 2023-07-05 10:04:51 +0200 | [diff] [blame] | 263 | } else if (cluster == "time-synchronization-server") { |
| 264 | sources += [ |
| 265 | "${_app_root}/clusters/${cluster}/${cluster}.cpp", |
| 266 | "${_app_root}/clusters/${cluster}/DefaultTimeSyncDelegate.cpp", |
| 267 | "${_app_root}/clusters/${cluster}/TimeSyncDataProvider.cpp", |
| 268 | ] |
C Freeman | 9853ecf | 2023-09-26 15:02:44 -0400 | [diff] [blame] | 269 | defines += |
| 270 | [ "TIME_SYNC_ENABLE_TSC_FEATURE=${time_sync_enable_tsc_feature}" ] |
lpbeliveau-silabs | 5dea83e | 2023-05-30 19:23:04 -0400 | [diff] [blame] | 271 | } else if (cluster == "scenes-server") { |
| 272 | sources += [ |
| 273 | "${_app_root}/clusters/${cluster}/${cluster}.cpp", |
| 274 | "${_app_root}/clusters/scenes-server/ExtensionFieldSetsImpl.cpp", |
| 275 | "${_app_root}/clusters/scenes-server/SceneTableImpl.cpp", |
| 276 | ] |
mideayanghui | da3e6f0 | 2023-07-13 15:31:13 +0800 | [diff] [blame] | 277 | } else if (cluster == "operational-state-server") { |
| 278 | sources += [ |
| 279 | "${_app_root}/clusters/${cluster}/${cluster}.cpp", |
| 280 | "${_app_root}/clusters/${cluster}/${cluster}.h", |
William | 81c4c9a | 2023-08-08 19:33:11 +0100 | [diff] [blame] | 281 | "${_app_root}/clusters/${cluster}/operational-state-cluster-objects.h", |
mideayanghui | da3e6f0 | 2023-07-13 15:31:13 +0800 | [diff] [blame] | 282 | ] |
fengdx4 | d328c30 | 2023-07-24 23:18:02 +0800 | [diff] [blame] | 283 | } else if (cluster == "dishwasher-alarm-server") { |
| 284 | sources += [ |
| 285 | "${_app_root}/clusters/${cluster}/${cluster}.cpp", |
| 286 | "${_app_root}/clusters/${cluster}/${cluster}.h", |
| 287 | "${_app_root}/clusters/${cluster}/dishwasher-alarm-delegate.h", |
| 288 | ] |
Junior Martinez | e6f610b | 2023-07-17 21:04:30 -0400 | [diff] [blame] | 289 | } else if (cluster == "icd-management-server") { |
| 290 | sources += [ "${_app_root}/clusters/${cluster}/${cluster}.cpp" ] |
| 291 | |
Ricardo Casallas | 60faf71 | 2023-07-19 15:18:07 -0400 | [diff] [blame] | 292 | deps += [ "${chip_root}/src/app/icd:cluster-srcs" ] |
Tobiasgraf | 78c62b0 | 2023-07-20 04:16:15 +0200 | [diff] [blame] | 293 | } else if (cluster == "resource-monitoring-server") { |
| 294 | sources += [ |
| 295 | "${_app_root}/clusters/${cluster}/${cluster}.cpp", |
| 296 | "${_app_root}/clusters/${cluster}/${cluster}.h", |
Cliff Chung | d2d4701 | 2023-07-20 12:02:01 -0700 | [diff] [blame] | 297 | "${_app_root}/clusters/${cluster}/replacement-product-list-manager.h", |
Tobiasgraf | 78c62b0 | 2023-07-20 04:16:15 +0200 | [diff] [blame] | 298 | "${_app_root}/clusters/${cluster}/resource-monitoring-cluster-objects.cpp", |
| 299 | "${_app_root}/clusters/${cluster}/resource-monitoring-cluster-objects.h", |
| 300 | ] |
Matt Hazley | 8e77e1a | 2023-08-23 19:16:57 +0100 | [diff] [blame] | 301 | } else if (cluster == "concentration-measurement-server") { |
| 302 | sources += [ |
| 303 | "${_app_root}/clusters/${cluster}/${cluster}.h", |
| 304 | "${_app_root}/clusters/${cluster}/concentration-measurement-cluster-objects.h", |
| 305 | ] |
EricZijian_Siter | a3c4b48 | 2023-08-10 11:58:46 +0800 | [diff] [blame] | 306 | } else if (cluster == "smoke-co-alarm-server") { |
| 307 | sources += [ |
| 308 | "${_app_root}/clusters/${cluster}/${cluster}.cpp", |
| 309 | "${_app_root}/clusters/${cluster}/${cluster}.h", |
| 310 | "${_app_root}/clusters/${cluster}/SmokeCOTestEventTriggerDelegate.cpp", |
| 311 | "${_app_root}/clusters/${cluster}/SmokeCOTestEventTriggerDelegate.h", |
| 312 | ] |
William | cbc3865 | 2023-08-22 10:24:56 +0100 | [diff] [blame] | 313 | } else if (cluster == "air-quality-server") { |
| 314 | sources += [ |
| 315 | "${_app_root}/clusters/${cluster}/${cluster}.cpp", |
| 316 | "${_app_root}/clusters/${cluster}/${cluster}.h", |
| 317 | ] |
Michael Spang | 9e28288 | 2021-04-26 15:54:03 -0400 | [diff] [blame] | 318 | } else { |
| 319 | sources += [ "${_app_root}/clusters/${cluster}/${cluster}.cpp" ] |
Michael Spang | e772be0 | 2021-04-09 14:03:22 -0400 | [diff] [blame] | 320 | } |
| 321 | } |
| 322 | |
Michael Spang | e772be0 | 2021-04-09 14:03:22 -0400 | [diff] [blame] | 323 | if (!defined(public_deps)) { |
| 324 | public_deps = [] |
| 325 | } |
| 326 | |
| 327 | public_deps += [ |
Andrei Litvin | 559c7d5 | 2022-10-21 13:38:11 -0400 | [diff] [blame] | 328 | ":${_data_model_name}_codegen", |
Andrei Litvin | 89c6fb6 | 2023-01-17 21:29:11 -0500 | [diff] [blame] | 329 | ":${_data_model_name}_zapgen", |
Michael Spang | e772be0 | 2021-04-09 14:03:22 -0400 | [diff] [blame] | 330 | "${chip_root}/src/app", |
yunhanw-google | d2403a0 | 2021-09-28 07:19:40 -0700 | [diff] [blame] | 331 | "${chip_root}/src/app/common:cluster-objects", |
Vivien Nicolas | b86e9a4 | 2021-04-27 22:40:35 +0200 | [diff] [blame] | 332 | "${chip_root}/src/controller", |
Michael Spang | e772be0 | 2021-04-09 14:03:22 -0400 | [diff] [blame] | 333 | "${chip_root}/src/lib/core", |
| 334 | "${chip_root}/src/lib/support", |
Pankaj Garg | 362c5f2 | 2021-04-14 16:35:15 -0700 | [diff] [blame] | 335 | "${chip_root}/src/protocols/secure_channel", |
Michael Spang | e772be0 | 2021-04-09 14:03:22 -0400 | [diff] [blame] | 336 | ] |
| 337 | |
Andrei Litvin | 89c6fb6 | 2023-01-17 21:29:11 -0500 | [diff] [blame] | 338 | if (is_server) { |
Vivien Nicolas | 92e3683 | 2021-05-01 00:38:25 +0200 | [diff] [blame] | 339 | public_deps += [ "${chip_root}/src/app/server" ] |
| 340 | } |
| 341 | |
Boris Zbarsky | 2f1c2d1 | 2021-06-25 15:29:20 -0400 | [diff] [blame] | 342 | cflags += [ "-Wconversion" ] |
| 343 | |
Boris Zbarsky | 3f0e043 | 2023-03-31 15:00:36 -0400 | [diff] [blame] | 344 | if (non_spec_compliant_ota_action_delay_floor >= 0) { |
| 345 | cflags += [ "-DNON_SPEC_COMPLIANT_OTA_ACTION_DELAY_FLOOR=${non_spec_compliant_ota_action_delay_floor}" ] |
| 346 | } |
| 347 | |
Michael Spang | e772be0 | 2021-04-09 14:03:22 -0400 | [diff] [blame] | 348 | if (!defined(public_configs)) { |
| 349 | public_configs = [] |
| 350 | } |
| 351 | |
| 352 | public_configs += [ ":${_data_model_name}_config" ] |
| 353 | } |
| 354 | } |