blob: 01506f2c38036ea1f89f1d381f235aeedabfa550 [file] [log] [blame]
Michael Spangefa630b2020-07-08 22:23:08 -04001# Copyright (c) 2020 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
15import("//build_overrides/chip.gni")
Boris Zbarsky5d663262020-08-27 18:12:39 -040016import("//build_overrides/nlio.gni")
Michael Spange00eac32021-06-21 17:25:47 -040017
18import("${chip_root}/build/chip/buildconfig_header.gni")
Song Guoa77a6622021-01-29 13:13:02 +080019import("common_flags.gni")
Michael Spangefa630b2020-07-08 22:23:08 -040020
yunhanw-googled644bb02021-04-13 07:26:17 -070021declare_args() {
22 # Enable strict schema checks.
23 chip_enable_schema_check =
24 is_debug && (current_os == "linux" || current_os == "mac")
25}
26
Michael Spange00eac32021-06-21 17:25:47 -040027buildconfig_header("app_buildconfig") {
28 header = "AppBuildConfig.h"
29 header_dir = "app"
30
31 defines = [ "CHIP_CONFIG_IM_ENABLE_SCHEMA_CHECK=${chip_enable_schema_check}" ]
Michael Spangefa630b2020-07-08 22:23:08 -040032}
33
Rob Walkerb14e3e32020-08-20 13:59:22 -070034static_library("app") {
35 output_name = "libCHIPDataModel"
Michael Spangefa630b2020-07-08 22:23:08 -040036
37 sources = [
Song GUObfdbd452021-12-06 15:53:34 +080038 "AttributeAccessInterface.cpp",
Jerry Johnsc8027a52021-12-13 17:20:15 -080039 "AttributeCache.cpp",
40 "AttributeCache.h",
Song GUO09736d32021-11-12 21:57:10 +080041 "AttributePathExpandIterator.cpp",
42 "AttributePathExpandIterator.h",
Song GUO09736d32021-11-12 21:57:10 +080043 "AttributePathParams.h",
Boris Zbarskyec713462022-01-06 15:53:22 -050044 "AttributePersistenceProvider.h",
Jerry Johns55349a52021-11-20 01:33:41 -080045 "BufferedReadCallback.cpp",
Jiacheng Guoaba3c812021-12-09 02:18:03 +080046 "CASEClient.cpp",
47 "CASEClient.h",
48 "CASEClientPool.h",
Pankaj Gargeb84a9d2021-11-16 13:59:57 -080049 "CASESessionManager.cpp",
50 "CASESessionManager.h",
yunhanw-googlee430b1d2021-01-06 06:12:46 -080051 "CommandHandler.cpp",
52 "CommandSender.cpp",
Boris Zbarskyec713462022-01-06 15:53:22 -050053 "DefaultAttributePersistenceProvider.cpp",
Pankaj Garga04576d2021-11-08 15:04:13 -080054 "DeviceProxy.cpp",
55 "DeviceProxy.h",
yunhanw-googleef040a72021-05-05 07:17:56 -070056 "EventManagement.cpp",
yunhanw-googlec79b67b2021-11-24 20:58:19 -080057 "EventPathParams.h",
yunhanw-googlee430b1d2021-01-06 06:12:46 -080058 "InteractionModelEngine.cpp",
yunhanw-google7898b532021-11-01 09:52:46 -070059 "MessageDef/ArrayBuilder.cpp",
60 "MessageDef/ArrayParser.cpp",
yunhanw-googleb717b362021-11-08 13:34:19 -080061 "MessageDef/AttributeDataIB.cpp",
62 "MessageDef/AttributeDataIB.h",
63 "MessageDef/AttributeDataIBs.cpp",
64 "MessageDef/AttributeDataIBs.h",
yunhanw-google64ffda02021-11-04 18:05:36 -070065 "MessageDef/AttributePathIB.cpp",
66 "MessageDef/AttributePathIB.h",
yunhanw-googleb717b362021-11-08 13:34:19 -080067 "MessageDef/AttributePathIBs.cpp",
68 "MessageDef/AttributePathIBs.h",
69 "MessageDef/AttributeReportIB.cpp",
70 "MessageDef/AttributeReportIB.h",
71 "MessageDef/AttributeReportIBs.cpp",
72 "MessageDef/AttributeReportIBs.h",
yunhanw-google35e67172021-10-11 17:12:06 -070073 "MessageDef/AttributeStatusIB.cpp",
74 "MessageDef/AttributeStatusIB.h",
yunhanw-googlef1117272021-12-02 19:59:44 -080075 "MessageDef/AttributeStatusIBs.cpp",
76 "MessageDef/AttributeStatusIBs.h",
yunhanw-google0c183552021-01-22 09:12:14 -080077 "MessageDef/Builder.cpp",
78 "MessageDef/Builder.h",
yunhanw-googlea1cb3412021-12-06 13:32:40 -080079 "MessageDef/ClusterPathIB.cpp",
80 "MessageDef/ClusterPathIB.h",
yunhanw-google67f74a32021-10-21 12:15:08 -070081 "MessageDef/CommandDataIB.cpp",
yunhanw-google8c2638c2021-10-20 16:33:42 -070082 "MessageDef/CommandPathIB.cpp",
yunhanw-google36e61e32021-11-02 08:31:34 -070083 "MessageDef/CommandStatusIB.cpp",
yunhanw-googlea1cb3412021-12-06 13:32:40 -080084 "MessageDef/DataVersionFilterIB.cpp",
85 "MessageDef/DataVersionFilterIB.h",
86 "MessageDef/DataVersionFilterIBs.cpp",
87 "MessageDef/DataVersionFilterIBs.h",
yunhanw-google3bec0f92021-11-03 16:12:39 -070088 "MessageDef/EventDataIB.cpp",
89 "MessageDef/EventDataIB.h",
yunhanw-googlebf585f82021-10-29 19:20:07 -070090 "MessageDef/EventFilterIB.cpp",
yunhanw-googlef1117272021-12-02 19:59:44 -080091 "MessageDef/EventFilterIBs.cpp",
yunhanw-google2fe90242021-11-01 15:13:44 -070092 "MessageDef/EventPathIB.cpp",
93 "MessageDef/EventPathIB.h",
yunhanw-googlef1117272021-12-02 19:59:44 -080094 "MessageDef/EventPathIBs.cpp",
95 "MessageDef/EventPathIBs.h",
yunhanw-google3bec0f92021-11-03 16:12:39 -070096 "MessageDef/EventReportIB.cpp",
97 "MessageDef/EventReportIB.h",
yunhanw-googlef1117272021-12-02 19:59:44 -080098 "MessageDef/EventReportIBs.cpp",
99 "MessageDef/EventReportIBs.h",
yunhanw-google1f6c6e62021-11-02 10:09:53 -0700100 "MessageDef/EventStatusIB.cpp",
101 "MessageDef/EventStatusIB.h",
yunhanw-google36e61e32021-11-02 08:31:34 -0700102 "MessageDef/InvokeRequestMessage.cpp",
103 "MessageDef/InvokeRequests.cpp",
104 "MessageDef/InvokeResponseIB.cpp",
yunhanw-googlef1117272021-12-02 19:59:44 -0800105 "MessageDef/InvokeResponseIBs.cpp",
yunhanw-google36e61e32021-11-02 08:31:34 -0700106 "MessageDef/InvokeResponseMessage.cpp",
yunhanw-google0c183552021-01-22 09:12:14 -0800107 "MessageDef/ListBuilder.cpp",
yunhanw-google0c183552021-01-22 09:12:14 -0800108 "MessageDef/ListParser.cpp",
yunhanw-googlee4c01152021-04-16 08:22:10 -0700109 "MessageDef/MessageDefHelper.cpp",
yunhanw-google0c183552021-01-22 09:12:14 -0800110 "MessageDef/MessageDefHelper.h",
111 "MessageDef/Parser.cpp",
112 "MessageDef/Parser.h",
yunhanw-google12ec7022021-11-01 19:53:29 -0700113 "MessageDef/ReadRequestMessage.cpp",
114 "MessageDef/ReadRequestMessage.h",
115 "MessageDef/ReportDataMessage.cpp",
116 "MessageDef/ReportDataMessage.h",
yunhanw-google35e67172021-10-11 17:12:06 -0700117 "MessageDef/StatusIB.cpp",
118 "MessageDef/StatusIB.h",
yunhanw-google12ec7022021-11-01 19:53:29 -0700119 "MessageDef/StatusResponseMessage.cpp",
yunhanw-google7898b532021-11-01 09:52:46 -0700120 "MessageDef/StructBuilder.cpp",
121 "MessageDef/StructParser.cpp",
yunhanw-google12ec7022021-11-01 19:53:29 -0700122 "MessageDef/SubscribeRequestMessage.cpp",
123 "MessageDef/SubscribeResponseMessage.cpp",
yunhanw-google7f05fb62021-10-29 06:55:58 -0700124 "MessageDef/TimedRequestMessage.cpp",
yunhanw-google12ec7022021-11-01 19:53:29 -0700125 "MessageDef/WriteRequestMessage.cpp",
126 "MessageDef/WriteResponseMessage.cpp",
Pankaj Garga04576d2021-11-08 15:04:13 -0800127 "OperationalDeviceProxy.cpp",
128 "OperationalDeviceProxy.h",
Jiacheng Guoaba3c812021-12-09 02:18:03 +0800129 "OperationalDeviceProxyPool.h",
yunhanw-google08566242021-03-18 15:29:39 -0700130 "ReadClient.cpp",
131 "ReadHandler.cpp",
yunhanw-googleb5dbad12021-11-16 16:46:37 -0800132 "StatusResponse.cpp",
133 "StatusResponse.h",
Boris Zbarskyffee2a92021-12-01 14:34:57 -0500134 "TimedHandler.cpp",
135 "TimedHandler.h",
Boris Zbarsky3397fdc2021-12-06 14:01:12 -0500136 "TimedRequest.cpp",
137 "TimedRequest.h",
yunhanw-google6c044e52021-06-18 13:01:52 -0700138 "WriteClient.cpp",
139 "WriteHandler.cpp",
Bhaskar Sarma14263d92020-08-25 14:06:58 -0700140 "decoder.cpp",
Michael Spang35b5ce32021-06-16 10:05:06 -0400141 "encoder-common.cpp",
yunhanw-googlededd3d02021-04-08 05:51:34 -0700142 "reporting/Engine.cpp",
Michael Spanga08f8262021-04-23 18:06:20 -0400143 "reporting/Engine.h",
Michael Spangefa630b2020-07-08 22:23:08 -0400144 ]
145
146 public_deps = [
Michael Spange00eac32021-06-21 17:25:47 -0400147 ":app_buildconfig",
Marc Lepage78719532021-12-06 23:01:50 -0500148 "${chip_root}/src/access",
Pankaj Garga04576d2021-11-08 15:04:13 -0800149 "${chip_root}/src/app/util:device_callbacks_manager",
Michael Spangefa630b2020-07-08 22:23:08 -0400150 "${chip_root}/src/lib/support",
yunhanw-googlee430b1d2021-01-06 06:12:46 -0800151 "${chip_root}/src/messaging",
yunhanw-google9c056ef2021-08-25 16:11:21 -0700152 "${chip_root}/src/protocols/secure_channel",
Michael Spangefa630b2020-07-08 22:23:08 -0400153 "${chip_root}/src/system",
Boris Zbarsky5d663262020-08-27 18:12:39 -0400154 "${nlio_root}:nlio",
Michael Spangefa630b2020-07-08 22:23:08 -0400155 ]
156
Boris Zbarsky46c78302020-09-24 15:57:57 -0400157 cflags = [ "-Wconversion" ]
158
Michael Spange00eac32021-06-21 17:25:47 -0400159 public_configs = [ "${chip_root}/src:includes" ]
Michael Spangefa630b2020-07-08 22:23:08 -0400160}