Michael Spang | efa630b | 2020-07-08 22:23:08 -0400 | [diff] [blame] | 1 | # 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 | |
| 15 | import("//build_overrides/chip.gni") |
Boris Zbarsky | 5d66326 | 2020-08-27 18:12:39 -0400 | [diff] [blame] | 16 | import("//build_overrides/nlio.gni") |
Michael Spang | e00eac3 | 2021-06-21 17:25:47 -0400 | [diff] [blame] | 17 | |
| 18 | import("${chip_root}/build/chip/buildconfig_header.gni") |
Song Guo | a77a662 | 2021-01-29 13:13:02 +0800 | [diff] [blame] | 19 | import("common_flags.gni") |
Michael Spang | efa630b | 2020-07-08 22:23:08 -0400 | [diff] [blame] | 20 | |
yunhanw-google | d644bb0 | 2021-04-13 07:26:17 -0700 | [diff] [blame] | 21 | declare_args() { |
| 22 | # Enable strict schema checks. |
| 23 | chip_enable_schema_check = |
| 24 | is_debug && (current_os == "linux" || current_os == "mac") |
| 25 | } |
| 26 | |
Michael Spang | e00eac3 | 2021-06-21 17:25:47 -0400 | [diff] [blame] | 27 | buildconfig_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 Spang | efa630b | 2020-07-08 22:23:08 -0400 | [diff] [blame] | 32 | } |
| 33 | |
Rob Walker | b14e3e3 | 2020-08-20 13:59:22 -0700 | [diff] [blame] | 34 | static_library("app") { |
| 35 | output_name = "libCHIPDataModel" |
Michael Spang | efa630b | 2020-07-08 22:23:08 -0400 | [diff] [blame] | 36 | |
| 37 | sources = [ |
Song GUO | bfdbd45 | 2021-12-06 15:53:34 +0800 | [diff] [blame] | 38 | "AttributeAccessInterface.cpp", |
Jerry Johns | c8027a5 | 2021-12-13 17:20:15 -0800 | [diff] [blame] | 39 | "AttributeCache.cpp", |
| 40 | "AttributeCache.h", |
Song GUO | 09736d3 | 2021-11-12 21:57:10 +0800 | [diff] [blame] | 41 | "AttributePathExpandIterator.cpp", |
| 42 | "AttributePathExpandIterator.h", |
Song GUO | 09736d3 | 2021-11-12 21:57:10 +0800 | [diff] [blame] | 43 | "AttributePathParams.h", |
Boris Zbarsky | ec71346 | 2022-01-06 15:53:22 -0500 | [diff] [blame^] | 44 | "AttributePersistenceProvider.h", |
Jerry Johns | 55349a5 | 2021-11-20 01:33:41 -0800 | [diff] [blame] | 45 | "BufferedReadCallback.cpp", |
Jiacheng Guo | aba3c81 | 2021-12-09 02:18:03 +0800 | [diff] [blame] | 46 | "CASEClient.cpp", |
| 47 | "CASEClient.h", |
| 48 | "CASEClientPool.h", |
Pankaj Garg | eb84a9d | 2021-11-16 13:59:57 -0800 | [diff] [blame] | 49 | "CASESessionManager.cpp", |
| 50 | "CASESessionManager.h", |
yunhanw-google | e430b1d | 2021-01-06 06:12:46 -0800 | [diff] [blame] | 51 | "CommandHandler.cpp", |
| 52 | "CommandSender.cpp", |
Boris Zbarsky | ec71346 | 2022-01-06 15:53:22 -0500 | [diff] [blame^] | 53 | "DefaultAttributePersistenceProvider.cpp", |
Pankaj Garg | a04576d | 2021-11-08 15:04:13 -0800 | [diff] [blame] | 54 | "DeviceProxy.cpp", |
| 55 | "DeviceProxy.h", |
yunhanw-google | ef040a7 | 2021-05-05 07:17:56 -0700 | [diff] [blame] | 56 | "EventManagement.cpp", |
yunhanw-google | c79b67b | 2021-11-24 20:58:19 -0800 | [diff] [blame] | 57 | "EventPathParams.h", |
yunhanw-google | e430b1d | 2021-01-06 06:12:46 -0800 | [diff] [blame] | 58 | "InteractionModelEngine.cpp", |
yunhanw-google | 7898b53 | 2021-11-01 09:52:46 -0700 | [diff] [blame] | 59 | "MessageDef/ArrayBuilder.cpp", |
| 60 | "MessageDef/ArrayParser.cpp", |
yunhanw-google | b717b36 | 2021-11-08 13:34:19 -0800 | [diff] [blame] | 61 | "MessageDef/AttributeDataIB.cpp", |
| 62 | "MessageDef/AttributeDataIB.h", |
| 63 | "MessageDef/AttributeDataIBs.cpp", |
| 64 | "MessageDef/AttributeDataIBs.h", |
yunhanw-google | 64ffda0 | 2021-11-04 18:05:36 -0700 | [diff] [blame] | 65 | "MessageDef/AttributePathIB.cpp", |
| 66 | "MessageDef/AttributePathIB.h", |
yunhanw-google | b717b36 | 2021-11-08 13:34:19 -0800 | [diff] [blame] | 67 | "MessageDef/AttributePathIBs.cpp", |
| 68 | "MessageDef/AttributePathIBs.h", |
| 69 | "MessageDef/AttributeReportIB.cpp", |
| 70 | "MessageDef/AttributeReportIB.h", |
| 71 | "MessageDef/AttributeReportIBs.cpp", |
| 72 | "MessageDef/AttributeReportIBs.h", |
yunhanw-google | 35e6717 | 2021-10-11 17:12:06 -0700 | [diff] [blame] | 73 | "MessageDef/AttributeStatusIB.cpp", |
| 74 | "MessageDef/AttributeStatusIB.h", |
yunhanw-google | f111727 | 2021-12-02 19:59:44 -0800 | [diff] [blame] | 75 | "MessageDef/AttributeStatusIBs.cpp", |
| 76 | "MessageDef/AttributeStatusIBs.h", |
yunhanw-google | 0c18355 | 2021-01-22 09:12:14 -0800 | [diff] [blame] | 77 | "MessageDef/Builder.cpp", |
| 78 | "MessageDef/Builder.h", |
yunhanw-google | a1cb341 | 2021-12-06 13:32:40 -0800 | [diff] [blame] | 79 | "MessageDef/ClusterPathIB.cpp", |
| 80 | "MessageDef/ClusterPathIB.h", |
yunhanw-google | 67f74a3 | 2021-10-21 12:15:08 -0700 | [diff] [blame] | 81 | "MessageDef/CommandDataIB.cpp", |
yunhanw-google | 8c2638c | 2021-10-20 16:33:42 -0700 | [diff] [blame] | 82 | "MessageDef/CommandPathIB.cpp", |
yunhanw-google | 36e61e3 | 2021-11-02 08:31:34 -0700 | [diff] [blame] | 83 | "MessageDef/CommandStatusIB.cpp", |
yunhanw-google | a1cb341 | 2021-12-06 13:32:40 -0800 | [diff] [blame] | 84 | "MessageDef/DataVersionFilterIB.cpp", |
| 85 | "MessageDef/DataVersionFilterIB.h", |
| 86 | "MessageDef/DataVersionFilterIBs.cpp", |
| 87 | "MessageDef/DataVersionFilterIBs.h", |
yunhanw-google | 3bec0f9 | 2021-11-03 16:12:39 -0700 | [diff] [blame] | 88 | "MessageDef/EventDataIB.cpp", |
| 89 | "MessageDef/EventDataIB.h", |
yunhanw-google | bf585f8 | 2021-10-29 19:20:07 -0700 | [diff] [blame] | 90 | "MessageDef/EventFilterIB.cpp", |
yunhanw-google | f111727 | 2021-12-02 19:59:44 -0800 | [diff] [blame] | 91 | "MessageDef/EventFilterIBs.cpp", |
yunhanw-google | 2fe9024 | 2021-11-01 15:13:44 -0700 | [diff] [blame] | 92 | "MessageDef/EventPathIB.cpp", |
| 93 | "MessageDef/EventPathIB.h", |
yunhanw-google | f111727 | 2021-12-02 19:59:44 -0800 | [diff] [blame] | 94 | "MessageDef/EventPathIBs.cpp", |
| 95 | "MessageDef/EventPathIBs.h", |
yunhanw-google | 3bec0f9 | 2021-11-03 16:12:39 -0700 | [diff] [blame] | 96 | "MessageDef/EventReportIB.cpp", |
| 97 | "MessageDef/EventReportIB.h", |
yunhanw-google | f111727 | 2021-12-02 19:59:44 -0800 | [diff] [blame] | 98 | "MessageDef/EventReportIBs.cpp", |
| 99 | "MessageDef/EventReportIBs.h", |
yunhanw-google | 1f6c6e6 | 2021-11-02 10:09:53 -0700 | [diff] [blame] | 100 | "MessageDef/EventStatusIB.cpp", |
| 101 | "MessageDef/EventStatusIB.h", |
yunhanw-google | 36e61e3 | 2021-11-02 08:31:34 -0700 | [diff] [blame] | 102 | "MessageDef/InvokeRequestMessage.cpp", |
| 103 | "MessageDef/InvokeRequests.cpp", |
| 104 | "MessageDef/InvokeResponseIB.cpp", |
yunhanw-google | f111727 | 2021-12-02 19:59:44 -0800 | [diff] [blame] | 105 | "MessageDef/InvokeResponseIBs.cpp", |
yunhanw-google | 36e61e3 | 2021-11-02 08:31:34 -0700 | [diff] [blame] | 106 | "MessageDef/InvokeResponseMessage.cpp", |
yunhanw-google | 0c18355 | 2021-01-22 09:12:14 -0800 | [diff] [blame] | 107 | "MessageDef/ListBuilder.cpp", |
yunhanw-google | 0c18355 | 2021-01-22 09:12:14 -0800 | [diff] [blame] | 108 | "MessageDef/ListParser.cpp", |
yunhanw-google | e4c0115 | 2021-04-16 08:22:10 -0700 | [diff] [blame] | 109 | "MessageDef/MessageDefHelper.cpp", |
yunhanw-google | 0c18355 | 2021-01-22 09:12:14 -0800 | [diff] [blame] | 110 | "MessageDef/MessageDefHelper.h", |
| 111 | "MessageDef/Parser.cpp", |
| 112 | "MessageDef/Parser.h", |
yunhanw-google | 12ec702 | 2021-11-01 19:53:29 -0700 | [diff] [blame] | 113 | "MessageDef/ReadRequestMessage.cpp", |
| 114 | "MessageDef/ReadRequestMessage.h", |
| 115 | "MessageDef/ReportDataMessage.cpp", |
| 116 | "MessageDef/ReportDataMessage.h", |
yunhanw-google | 35e6717 | 2021-10-11 17:12:06 -0700 | [diff] [blame] | 117 | "MessageDef/StatusIB.cpp", |
| 118 | "MessageDef/StatusIB.h", |
yunhanw-google | 12ec702 | 2021-11-01 19:53:29 -0700 | [diff] [blame] | 119 | "MessageDef/StatusResponseMessage.cpp", |
yunhanw-google | 7898b53 | 2021-11-01 09:52:46 -0700 | [diff] [blame] | 120 | "MessageDef/StructBuilder.cpp", |
| 121 | "MessageDef/StructParser.cpp", |
yunhanw-google | 12ec702 | 2021-11-01 19:53:29 -0700 | [diff] [blame] | 122 | "MessageDef/SubscribeRequestMessage.cpp", |
| 123 | "MessageDef/SubscribeResponseMessage.cpp", |
yunhanw-google | 7f05fb6 | 2021-10-29 06:55:58 -0700 | [diff] [blame] | 124 | "MessageDef/TimedRequestMessage.cpp", |
yunhanw-google | 12ec702 | 2021-11-01 19:53:29 -0700 | [diff] [blame] | 125 | "MessageDef/WriteRequestMessage.cpp", |
| 126 | "MessageDef/WriteResponseMessage.cpp", |
Pankaj Garg | a04576d | 2021-11-08 15:04:13 -0800 | [diff] [blame] | 127 | "OperationalDeviceProxy.cpp", |
| 128 | "OperationalDeviceProxy.h", |
Jiacheng Guo | aba3c81 | 2021-12-09 02:18:03 +0800 | [diff] [blame] | 129 | "OperationalDeviceProxyPool.h", |
yunhanw-google | 0856624 | 2021-03-18 15:29:39 -0700 | [diff] [blame] | 130 | "ReadClient.cpp", |
| 131 | "ReadHandler.cpp", |
yunhanw-google | b5dbad1 | 2021-11-16 16:46:37 -0800 | [diff] [blame] | 132 | "StatusResponse.cpp", |
| 133 | "StatusResponse.h", |
Boris Zbarsky | ffee2a9 | 2021-12-01 14:34:57 -0500 | [diff] [blame] | 134 | "TimedHandler.cpp", |
| 135 | "TimedHandler.h", |
Boris Zbarsky | 3397fdc | 2021-12-06 14:01:12 -0500 | [diff] [blame] | 136 | "TimedRequest.cpp", |
| 137 | "TimedRequest.h", |
yunhanw-google | 6c044e5 | 2021-06-18 13:01:52 -0700 | [diff] [blame] | 138 | "WriteClient.cpp", |
| 139 | "WriteHandler.cpp", |
Bhaskar Sarma | 14263d9 | 2020-08-25 14:06:58 -0700 | [diff] [blame] | 140 | "decoder.cpp", |
Michael Spang | 35b5ce3 | 2021-06-16 10:05:06 -0400 | [diff] [blame] | 141 | "encoder-common.cpp", |
yunhanw-google | dedd3d0 | 2021-04-08 05:51:34 -0700 | [diff] [blame] | 142 | "reporting/Engine.cpp", |
Michael Spang | a08f826 | 2021-04-23 18:06:20 -0400 | [diff] [blame] | 143 | "reporting/Engine.h", |
Michael Spang | efa630b | 2020-07-08 22:23:08 -0400 | [diff] [blame] | 144 | ] |
| 145 | |
| 146 | public_deps = [ |
Michael Spang | e00eac3 | 2021-06-21 17:25:47 -0400 | [diff] [blame] | 147 | ":app_buildconfig", |
Marc Lepage | 7871953 | 2021-12-06 23:01:50 -0500 | [diff] [blame] | 148 | "${chip_root}/src/access", |
Pankaj Garg | a04576d | 2021-11-08 15:04:13 -0800 | [diff] [blame] | 149 | "${chip_root}/src/app/util:device_callbacks_manager", |
Michael Spang | efa630b | 2020-07-08 22:23:08 -0400 | [diff] [blame] | 150 | "${chip_root}/src/lib/support", |
yunhanw-google | e430b1d | 2021-01-06 06:12:46 -0800 | [diff] [blame] | 151 | "${chip_root}/src/messaging", |
yunhanw-google | 9c056ef | 2021-08-25 16:11:21 -0700 | [diff] [blame] | 152 | "${chip_root}/src/protocols/secure_channel", |
Michael Spang | efa630b | 2020-07-08 22:23:08 -0400 | [diff] [blame] | 153 | "${chip_root}/src/system", |
Boris Zbarsky | 5d66326 | 2020-08-27 18:12:39 -0400 | [diff] [blame] | 154 | "${nlio_root}:nlio", |
Michael Spang | efa630b | 2020-07-08 22:23:08 -0400 | [diff] [blame] | 155 | ] |
| 156 | |
Boris Zbarsky | 46c7830 | 2020-09-24 15:57:57 -0400 | [diff] [blame] | 157 | cflags = [ "-Wconversion" ] |
| 158 | |
Michael Spang | e00eac3 | 2021-06-21 17:25:47 -0400 | [diff] [blame] | 159 | public_configs = [ "${chip_root}/src:includes" ] |
Michael Spang | efa630b | 2020-07-08 22:23:08 -0400 | [diff] [blame] | 160 | } |