blob: 30ccbf222ab14dc111b2a4696e571c2d10c78e56 [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
Łukasz Duda4e1faf22021-01-27 17:47:25 +010015import("//build_overrides/build.gni")
Michael Spangefa630b2020-07-08 22:23:08 -040016import("//build_overrides/chip.gni")
17import("//build_overrides/mbedtls.gni")
18import("//build_overrides/nlassert.gni")
19import("//build_overrides/nlio.gni")
20import("//build_overrides/nlunit_test.gni")
21import("//build_overrides/pigweed.gni")
Łukasz Duda4e1faf22021-01-27 17:47:25 +010022
Michael Spangbad533e2021-03-09 01:28:51 -050023import("//src/lwip/lwip.gni")
Kamil Kasperczykd05149c2021-01-05 16:05:27 +010024import("//src/platform/device.gni")
szatmz2244db62020-12-04 14:42:01 -050025import("$dir_pw_build/python.gni")
Michael Spangefa630b2020-07-08 22:23:08 -040026
27# This build file should not be used in superproject builds.
28assert(chip_root == "//")
29
Michael Spang09611bf2021-03-02 16:31:57 -050030import("${chip_root}/build/chip/tests.gni")
31import("${chip_root}/build/chip/tools.gni")
Michael Spangefa630b2020-07-08 22:23:08 -040032
Evgeny Margolisf0e9f912021-05-13 16:02:38 -070033import("//src/crypto/crypto.gni")
34
Rob Mohr41c76b62021-06-02 12:43:21 -070035if (current_toolchain != "${dir_pw_toolchain}/default:default") {
Andrei Litvin2d863492020-10-02 17:28:58 -040036 declare_args() {
Michael Spang4833d9c2020-10-09 09:33:02 -040037 chip_enable_python_modules =
Song Guod652be42020-11-11 00:34:35 +080038 (current_os == "mac" || current_os == "linux") &&
39 (host_cpu == "x64" || host_cpu == "arm64")
Josh V [Apple]1ec61612021-08-18 12:52:27 -070040 enable_pylib = false
Andrei Litvin2d863492020-10-02 17:28:58 -040041 }
42
szatmz2244db62020-12-04 14:42:01 -050043 # Python packages for supporting specific targets.
44 pw_python_group("python_packages") {
45 python_deps = [
Michael Spang4e8080b2021-02-12 15:03:57 -050046 "$dir_pw_build/py",
47 "$dir_pw_doctor/py",
48 "$dir_pw_env_setup/py",
49 "$dir_pw_hdlc/py",
Yuanyao Zhong4e7c5e92022-01-13 14:58:00 -050050 "$dir_pw_log:protos.python",
Michael Spang4e8080b2021-02-12 15:03:57 -050051 "$dir_pw_module/py",
52 "$dir_pw_protobuf/py",
53 "$dir_pw_protobuf_compiler/py",
54 "$dir_pw_rpc/py",
55 "$dir_pw_status/py",
56 "$dir_pw_toolchain/py",
Yuanyao Zhong4e7c5e92022-01-13 14:58:00 -050057 "$dir_pw_trace/py",
58 "$dir_pw_trace_tokenized/py",
Michael Spang4e8080b2021-02-12 15:03:57 -050059 "$dir_pw_unit_test/py",
60 "$dir_pw_watch/py",
szatmz2244db62020-12-04 14:42:01 -050061 "integrations/mobly:chip_mobly",
Rob Mohr5cda0bd2021-04-10 01:23:15 -070062 "scripts:requirements",
szatmz2244db62020-12-04 14:42:01 -050063 ]
64 }
65
Michael Spangefa630b2020-07-08 22:23:08 -040066 # This is a real toolchain. Build CHIP.
67 group("default") {
Michael Spangefa630b2020-07-08 22:23:08 -040068 deps = [
69 "${chip_root}/src/app",
70 "${chip_root}/src/ble",
71 "${chip_root}/src/controller",
Evgeny Margolis53538582021-01-12 09:14:24 -080072 "${chip_root}/src/credentials",
Tennessee Carmel-Veilleux22fb6c32022-02-22 16:49:16 -050073 "${chip_root}/src/credentials:default_attestation_verifier",
Michael Spangefa630b2020-07-08 22:23:08 -040074 "${chip_root}/src/crypto",
75 "${chip_root}/src/inet",
76 "${chip_root}/src/lib",
Evgeny Margolisdf862122020-10-22 07:47:27 -070077 "${chip_root}/src/lib/asn1",
Michael Spangefa630b2020-07-08 22:23:08 -040078 "${chip_root}/src/lib/core",
79 "${chip_root}/src/lib/support",
Yufeng Wang4fc19f12020-10-22 16:14:32 -070080 "${chip_root}/src/messaging",
Yufeng Wanga3d40542020-11-04 13:12:48 -080081 "${chip_root}/src/protocols",
Rob Walkerb14e3e32020-08-20 13:59:22 -070082 "${chip_root}/src/setup_payload",
Michael Spangefa630b2020-07-08 22:23:08 -040083 "${chip_root}/src/system",
84 "${chip_root}/src/transport",
85 "${mbedtls_root}:mbedtls",
86 "${nlassert_root}:nlassert",
87 "${nlio_root}:nlio",
88 "${nlunit_test_root}:nlunit-test",
89 ]
90
Kamil Kasperczykd05149c2021-01-05 16:05:27 +010091 if (chip_device_platform != "none") {
92 deps += [ "${chip_root}/src/app/server" ]
93 }
94
Michael Spangefa630b2020-07-08 22:23:08 -040095 if (chip_build_tests) {
Rafał Kuźnia6b3ee1a2020-09-04 03:08:16 +020096 deps += [ "//src:tests" ]
Austin Hsiehc9c3b652021-09-24 06:52:56 -070097 if (current_os == "android") {
98 deps += [ "${chip_root}/build/chip/java/tests:java_build_test" ]
99 }
Michael Spangefa630b2020-07-08 22:23:08 -0400100 }
101
Michael Spangbad533e2021-03-09 01:28:51 -0500102 if (chip_with_lwip) {
Michael Spange1c64e32021-06-21 14:53:44 -0400103 deps += [ "${chip_root}/src/lwip" ]
Michael Spangbad533e2021-03-09 01:28:51 -0500104 }
105
Michael Spangefa630b2020-07-08 22:23:08 -0400106 if (chip_build_tools) {
107 deps += [
Michael Spangc8f7c692021-03-19 10:41:51 -0400108 ":certification",
Timothy Maes9e1ac482020-10-29 17:59:49 +0100109 "${chip_root}/examples/shell/standalone:chip-shell",
yunhanw-googlee430b1d2021-01-06 06:12:46 -0800110 "${chip_root}/src/app/tests/integration:chip-im-initiator",
111 "${chip_root}/src/app/tests/integration:chip-im-responder",
Andrei Litvin0a760e42022-02-22 17:07:31 -0500112 "${chip_root}/src/lib/address_resolve:address-resolve-tool",
Yufeng Wang4282a072020-12-08 08:58:46 -0800113 "${chip_root}/src/messaging/tests/echo:chip-echo-requester",
114 "${chip_root}/src/messaging/tests/echo:chip-echo-responder",
Michael Spangefa630b2020-07-08 22:23:08 -0400115 "${chip_root}/src/qrcodetool",
116 "${chip_root}/src/setup_payload",
Evgeny Margolis4d9f8c02022-01-25 20:28:43 -0800117 "${chip_root}/src/tools/spake2p",
Michael Spangefa630b2020-07-08 22:23:08 -0400118 ]
Evgeny Margolisf0e9f912021-05-13 16:02:38 -0700119 if (chip_crypto == "openssl") {
120 deps += [ "${chip_root}/src/tools/chip-cert" ]
121 }
Andrei Litvin2d863492020-10-02 17:28:58 -0400122 if (chip_enable_python_modules) {
Josh V [Apple]1ec61612021-08-18 12:52:27 -0700123 if (enable_pylib) {
124 deps += [ "${chip_root}/src/pybindings/pycontroller" ]
125 }
yunhanw-google90ea3142020-10-01 13:53:26 -0700126 deps += [ "${chip_root}/src/controller/python" ]
127 }
Michael Spangefa630b2020-07-08 22:23:08 -0400128 }
Andrei Litvind74a0b62020-08-30 19:58:00 -0400129
130 if (current_os == "android") {
131 deps += [
Hui.Li-TCL62b337e2021-11-02 23:29:58 +0800132 "${chip_root}/src/app/server/java",
Andrei Litvind74a0b62020-08-30 19:58:00 -0400133 "${chip_root}/src/controller/java",
Hui.Li-TCL924f36e2021-09-30 20:51:41 +0800134 "${chip_root}/src/platform/android:java",
Andrei Litvind74a0b62020-08-30 19:58:00 -0400135 "${chip_root}/src/setup_payload/java",
136 ]
137 }
Michael Spangefa630b2020-07-08 22:23:08 -0400138 }
139
Michael Spangc8f7c692021-03-19 10:41:51 -0400140 if (chip_build_tools) {
141 group("certification") {
142 data_deps = [ "${chip_root}/examples/chip-tool" ]
143
144 if (chip_enable_python_modules) {
Josh V [Apple]1ec61612021-08-18 12:52:27 -0700145 if (enable_pylib) {
146 data_deps += [ "${chip_root}/src/pybindings/pycontroller" ]
147 }
Michael Spangc8f7c692021-03-19 10:41:51 -0400148 data_deps += [ "${chip_root}/src/controller/python" ]
149 }
150
151 write_runtime_deps = "${root_out_dir}/certification.runtime_deps"
152 }
153 }
154
C Freeman79c93152021-08-18 00:20:05 -0400155 group("fake_platform_tests") {
156 if (chip_link_tests) {
157 deps = [ "//src:fake_platform_tests_run" ]
158 }
159 }
160
Michael Spangdf712982020-09-18 10:39:35 -0400161 group("check") {
162 if (chip_link_tests) {
Sweetyc1fbb492021-07-20 20:28:07 +0530163 deps = [
C Freeman79c93152021-08-18 00:20:05 -0400164 "//:fake_platform_tests",
Sweetyc1fbb492021-07-20 20:28:07 +0530165 "//scripts/build:build_examples.tests",
Andrei Litvinb519c8e2022-01-21 09:11:25 -0500166 "//scripts/idl:idl.tests",
Sweetyc1fbb492021-07-20 20:28:07 +0530167 "//src:tests_run",
168 ]
Michael Spangefa630b2020-07-08 22:23:08 -0400169 }
170 }
171} else {
Michael Spangf1af8fc2020-07-29 14:25:47 -0400172 # This is the unified build. Configure various real toolchains.
Michael Spang09611bf2021-03-02 16:31:57 -0500173 import("${chip_root}/build/chip/chip_build.gni")
Michael Spangefa630b2020-07-08 22:23:08 -0400174 declare_args() {
175 # Set this to false to disable all builds by default.
176 enable_default_builds = true
Michael Spang8d085b32020-07-10 10:26:23 -0400177
Michael Spangfdc49a32020-09-03 18:33:20 -0400178 # Enable building for Android.
179 enable_android_builds = false
180
Seth Rickard4f0521f2021-01-12 16:06:52 -0600181 # Set this to true to enable TI builds by default.
Michael Spang2891d6b2021-02-24 14:00:22 -0500182 enable_ti_simplelink_builds = false
Seth Rickard4f0521f2021-01-12 16:06:52 -0600183
jepenven-silabscec75ca2020-08-04 09:38:48 -0400184 # Set this to true to enable efr32 builds by default.
185 enable_efr32_builds = false
Timothy Maesb5b3d382020-10-05 16:59:21 +0200186
Praveen Chandran080ae572021-08-12 07:58:27 -0700187 # Set this to true to enable p6 builds by default.
188 enable_p6_builds = false
189
Timothy Maes2478e022021-07-02 04:03:46 +0200190 # Set this to true to enable Qorvo qpg builds by default.
191 enable_qpg_builds = false
doru9104ac26b2020-10-13 18:23:28 +0300192
193 # Set this to true to enable k32w builds by default.
194 enable_k32w_builds = false
Michael Spangefa630b2020-07-08 22:23:08 -0400195 }
196
197 declare_args() {
198 # Enable building chip with clang.
Michael Spangcd0f6112021-01-22 17:06:25 -0500199 enable_host_clang_build = enable_default_builds && host_os != "win"
Michael Spangefa630b2020-07-08 22:23:08 -0400200
201 # Enable building chip with gcc.
Michael Spangcd0f6112021-01-22 17:06:25 -0500202 enable_host_gcc_build = enable_default_builds && host_os != "win"
Michael Spangefa630b2020-07-08 22:23:08 -0400203
Michael Spanga964fad2020-07-13 09:36:00 -0400204 # Enable building chip with gcc & mbedtls.
Michael Spangcd0f6112021-01-22 17:06:25 -0500205 enable_host_gcc_mbedtls_build = enable_default_builds && host_os != "win"
Michael Spanga964fad2020-07-13 09:36:00 -0400206
Evgeny Margolis1486eb72021-07-12 20:18:00 -0700207 # Build the chip-cert tool.
208 enable_standalone_chip_cert_build =
209 enable_default_builds && host_os != "win" && chip_crypto == "openssl"
210
Michael Spang8d085b32020-07-10 10:26:23 -0400211 # Build the chip-tool example.
Michael Spangcd0f6112021-01-22 17:06:25 -0500212 enable_standalone_chip_tool_build =
213 enable_default_builds && host_os != "win"
Michael Spang8d085b32020-07-10 10:26:23 -0400214
Vivien Nicolas87d46d52021-03-17 17:43:37 +0100215 # Build the chip-tool-darwin example.
216 enable_standalone_chip_tool_darwin_build =
217 enable_default_builds && host_os == "mac"
218
Michael Spang8d085b32020-07-10 10:26:23 -0400219 # Build the shell example.
Michael Spangcd0f6112021-01-22 17:06:25 -0500220 enable_standalone_shell_build = enable_default_builds && host_os != "win"
Michael Spang8d085b32020-07-10 10:26:23 -0400221
Vivien Nicolas280d80f2020-11-06 22:56:40 +0100222 # Build the Linux all clusters app example.
223 enable_linux_all_clusters_app_build =
Vivien Nicolas1b296552020-12-07 18:24:57 +0100224 enable_default_builds && (host_os == "linux" || host_os == "mac")
Vivien Nicolas280d80f2020-11-06 22:56:40 +0100225
Lazar Kovacic7fe8c922021-05-18 03:46:21 +0200226 # Build the Linux tv app example.
227 enable_linux_tv_app_build =
228 enable_default_builds && (host_os == "linux" || host_os == "mac")
229
Sharad Binjola2937f1a2021-08-24 14:25:16 -0700230 # Build the Linux tv casting app example.
231 enable_linux_tv_casting_app_build =
232 enable_default_builds && (host_os == "linux" || host_os == "mac")
233
Vivien Nicolas139e71d2021-02-16 19:12:41 +0100234 # Build the Linux bridge app example.
235 enable_linux_bridge_app_build =
236 enable_default_builds && (host_os == "linux" || host_os == "mac")
237
Michael Spang7c8f19b2020-11-02 13:05:12 -0500238 # Build the Linux lighting app example.
239 enable_linux_lighting_app_build =
Vivien Nicolas1b296552020-12-07 18:24:57 +0100240 enable_default_builds && (host_os == "linux" || host_os == "mac")
Michael Spang7c8f19b2020-11-02 13:05:12 -0500241
chrisbeach59bb9a2392021-07-26 10:01:46 -0400242 # Build the Linux thermostat app example.
243 enable_linux_thermostat_app_build =
244 enable_default_builds && (host_os == "linux" || host_os == "mac")
245
Dustin Crossmanb0063212022-01-04 09:19:36 -0800246 # Build the Linux door lock app example.
247 enable_linux_door_lock_app_build =
248 enable_default_builds && (host_os == "linux" || host_os == "mac")
249
Michael Spang2891d6b2021-02-24 14:00:22 -0500250 # Build the cc13x2x7_26x2x7 lock app example.
251 enable_cc13x2x7_26x2x7_lock_app_build = enable_ti_simplelink_builds
Seth Rickard4f0521f2021-01-12 16:06:52 -0600252
jepenven-silabscec75ca2020-08-04 09:38:48 -0400253 # Build the efr32 lock app example.
254 enable_efr32_lock_app_build = enable_efr32_builds
Michael Spang02413732020-09-24 09:45:17 -0400255
Praveen Chandran080ae572021-08-12 07:58:27 -0700256 # Build the p6 lock app example.
257 enable_p6_lock_app_build = enable_p6_builds
258
Timothy Maes2478e022021-07-02 04:03:46 +0200259 # Build the qpgxxxx lock app example.
Michael Spang706874a2021-07-02 21:45:45 -0400260 enable_qpg_lock_app_build = enable_qpg_builds && !is_debug
Timothy Maesb5b3d382020-10-05 16:59:21 +0200261
Michael Spang02413732020-09-24 09:45:17 -0400262 # Build the efr32 lighting app example.
263 enable_efr32_lighting_app_build = enable_efr32_builds
doru9104ac26b2020-10-13 18:23:28 +0300264
cecille3588d782021-04-09 14:03:54 -0400265 # Build the efr32 window app example.
266 enable_efr32_window_app_build = enable_efr32_builds
267
Michael Spang18a5a402021-06-15 23:34:41 -0400268 # Build the k32w lighting app example.
269 enable_k32w_lighting_app_build = enable_k32w_builds
270
doru9104ac26b2020-10-13 18:23:28 +0300271 # Build the k32w lock app example.
272 enable_k32w_lock_app_build = enable_k32w_builds
Michael Spang18a5a402021-06-15 23:34:41 -0400273
274 # Build the k32w shell app example.
275 enable_k32w_shell_app_build = enable_k32w_builds
C Freeman79c93152021-08-18 00:20:05 -0400276
277 enable_fake_tests = enable_default_builds && host_os == "linux"
Michael Spangefa630b2020-07-08 22:23:08 -0400278 }
279
Michael Spang7c8f19b2020-11-02 13:05:12 -0500280 if (enable_host_clang_build) {
281 chip_build("host_clang") {
Łukasz Duda4e1faf22021-01-27 17:47:25 +0100282 toolchain = "${build_root}/toolchain/host:${host_os}_${host_cpu}_clang"
Michael Spang7c8f19b2020-11-02 13:05:12 -0500283 }
Michael Spangefa630b2020-07-08 22:23:08 -0400284 }
285
Michael Spang7c8f19b2020-11-02 13:05:12 -0500286 if (enable_host_gcc_build) {
287 chip_build("host_gcc") {
Łukasz Duda4e1faf22021-01-27 17:47:25 +0100288 toolchain = "${build_root}/toolchain/host:${host_os}_${host_cpu}_gcc"
Michael Spang7c8f19b2020-11-02 13:05:12 -0500289 }
Michael Spangefa630b2020-07-08 22:23:08 -0400290 }
291
Michael Spang7c8f19b2020-11-02 13:05:12 -0500292 if (enable_host_gcc_mbedtls_build) {
293 chip_build("host_gcc_mbedtls") {
294 toolchain = "${chip_root}/config/mbedtls/toolchain:${host_os}_${host_cpu}_gcc_mbedtls"
295 }
Michael Spang8d085b32020-07-10 10:26:23 -0400296 }
297
Michael Spangfdc49a32020-09-03 18:33:20 -0400298 if (enable_android_builds) {
299 chip_build("android_arm") {
Łukasz Duda4e1faf22021-01-27 17:47:25 +0100300 toolchain = "${build_root}/toolchain/android:android_arm"
Michael Spangfdc49a32020-09-03 18:33:20 -0400301 }
302
303 chip_build("android_arm64") {
Łukasz Duda4e1faf22021-01-27 17:47:25 +0100304 toolchain = "${build_root}/toolchain/android:android_arm64"
Michael Spangfdc49a32020-09-03 18:33:20 -0400305 }
306
307 chip_build("android_x64") {
Łukasz Duda4e1faf22021-01-27 17:47:25 +0100308 toolchain = "${build_root}/toolchain/android:android_x64"
Michael Spangfdc49a32020-09-03 18:33:20 -0400309 }
310
311 chip_build("android_x86") {
Łukasz Duda4e1faf22021-01-27 17:47:25 +0100312 toolchain = "${build_root}/toolchain/android:android_x86"
Michael Spangfdc49a32020-09-03 18:33:20 -0400313 }
314 }
315
C Freeman79c93152021-08-18 00:20:05 -0400316 if (enable_fake_tests) {
317 chip_build("fake_platform") {
Andrei Litvin7ce0f472021-11-16 15:49:26 -0500318 toolchain = "${build_root}/toolchain/fake:fake_${host_cpu}_gcc"
C Freeman79c93152021-08-18 00:20:05 -0400319 }
320 }
321
Michael Spang8d085b32020-07-10 10:26:23 -0400322 standalone_toolchain = "${chip_root}/config/standalone/toolchain:standalone"
Michael Spangf92b73d2021-01-05 10:31:03 -0500323 not_needed([ "standalone_toolchain" ]) # Might not be needed.
Michael Spang8d085b32020-07-10 10:26:23 -0400324
Evgeny Margolis1486eb72021-07-12 20:18:00 -0700325 if (enable_standalone_chip_cert_build) {
326 group("standalone_chip_cert") {
327 deps = [ "${chip_root}/src/tools/chip-cert(${standalone_toolchain})" ]
328 }
329 }
330
Michael Spang7c8f19b2020-11-02 13:05:12 -0500331 if (enable_standalone_chip_tool_build) {
332 group("standalone_chip_tool") {
333 deps = [ "${chip_root}/examples/chip-tool(${standalone_toolchain})" ]
334 }
Michael Spang8d085b32020-07-10 10:26:23 -0400335 }
336
Vivien Nicolas87d46d52021-03-17 17:43:37 +0100337 if (enable_standalone_chip_tool_darwin_build) {
338 group("standalone_chip_tool_darwin") {
339 deps =
340 [ "${chip_root}/examples/chip-tool-darwin(${standalone_toolchain})" ]
341 }
342 }
343
Michael Spang2891d6b2021-02-24 14:00:22 -0500344 if (enable_cc13x2x7_26x2x7_lock_app_build) {
345 group("cc13x2x7_26x2x7_lock_app") {
346 deps = [ "${chip_root}/examples/lock-app/cc13x2x7_26x2x7(${chip_root}/config/cc13x2_26x2/toolchain:cc13x2x7_26x2x7_lock_app)" ]
Seth Rickard4f0521f2021-01-12 16:06:52 -0600347 }
348 }
349
Michael Spang7c8f19b2020-11-02 13:05:12 -0500350 if (enable_standalone_shell_build) {
351 group("standalone_shell") {
352 deps =
353 [ "${chip_root}/examples/shell/standalone(${standalone_toolchain})" ]
354 }
355 }
356
Vivien Nicolas280d80f2020-11-06 22:56:40 +0100357 if (enable_linux_all_clusters_app_build) {
358 group("linux_all_clusters_app") {
359 deps = [
360 "${chip_root}/examples/all-clusters-app/linux(${standalone_toolchain})",
361 ]
362 }
363 }
364
chrisbeach59bb9a2392021-07-26 10:01:46 -0400365 if (enable_linux_thermostat_app_build) {
366 group("linux_thermostat_app") {
367 deps =
368 [ "${chip_root}/examples/thermostat/linux(${standalone_toolchain})" ]
369 }
370 }
371
Lazar Kovacic7fe8c922021-05-18 03:46:21 +0200372 if (enable_linux_tv_app_build) {
373 group("linux_tv_app") {
374 deps = [ "${chip_root}/examples/tv-app/linux(${standalone_toolchain})" ]
375 }
376 }
377
Sharad Binjola2937f1a2021-08-24 14:25:16 -0700378 if (enable_linux_tv_casting_app_build) {
379 group("linux_tv_casting_app") {
380 deps = [
381 "${chip_root}/examples/tv-casting-app/linux(${standalone_toolchain})",
382 ]
383 }
384 }
385
Vivien Nicolas139e71d2021-02-16 19:12:41 +0100386 if (enable_linux_bridge_app_build) {
387 group("linux_bridge_app") {
388 deps =
389 [ "${chip_root}/examples/bridge-app/linux(${standalone_toolchain})" ]
390 }
391 }
392
Michael Spang7c8f19b2020-11-02 13:05:12 -0500393 if (enable_linux_lighting_app_build) {
394 group("linux_lighting_app") {
395 deps = [
396 "${chip_root}/examples/lighting-app/linux(${standalone_toolchain})",
397 ]
398 }
Michael Spang8d085b32020-07-10 10:26:23 -0400399 }
400
Dustin Crossmanb0063212022-01-04 09:19:36 -0800401 if (enable_linux_door_lock_app_build) {
402 group("linux_door_lock_app") {
403 deps = [
404 "${chip_root}/examples/door-lock-app/linux(${standalone_toolchain})",
405 ]
406 }
407 }
408
jepenven-silabscec75ca2020-08-04 09:38:48 -0400409 if (enable_efr32_lock_app_build) {
410 group("efr32_lock_app") {
411 deps = [ "${chip_root}/examples/lock-app/efr32(${chip_root}/config/efr32/toolchain:efr32_lock_app)" ]
412 }
413 }
414
Praveen Chandran080ae572021-08-12 07:58:27 -0700415 if (enable_p6_lock_app_build) {
416 group("p6_lock_app") {
417 deps = [ "${chip_root}/examples/lock-app/p6(${chip_root}/config/p6/toolchain:p6_lock_app)" ]
418 }
419 }
420
Timothy Maes2478e022021-07-02 04:03:46 +0200421 if (enable_qpg_lock_app_build) {
422 group("qpg_lock_app") {
423 deps = [ "${chip_root}/examples/lock-app/qpg(${chip_root}/config/qpg/toolchain:qpg_lock_app)" ]
Timothy Maesb5b3d382020-10-05 16:59:21 +0200424 }
425 }
426
Michael Spang02413732020-09-24 09:45:17 -0400427 if (enable_efr32_lighting_app_build) {
428 group("efr32_lighting_app") {
429 deps = [ "${chip_root}/examples/lighting-app/efr32(${chip_root}/config/efr32/toolchain:efr32_lighting_app)" ]
430 }
431 }
432
cecille3588d782021-04-09 14:03:54 -0400433 if (enable_efr32_window_app_build) {
434 group("efr32_window_app") {
435 deps = [ "${chip_root}/examples/window-app/efr32(${chip_root}/config/efr32/toolchain:efr32_window_app)" ]
436 }
437 }
438
Michael Spang18a5a402021-06-15 23:34:41 -0400439 if (enable_k32w_lighting_app_build) {
440 group("k32w_lighting_app") {
Andrei Litvin41300eb2022-02-17 00:39:14 -0500441 deps = [ "${chip_root}/examples/lighting-app/nxp/k32w/k32w0/(${chip_root}/config/k32w/toolchain:k32w_lighting_app)" ]
Michael Spang18a5a402021-06-15 23:34:41 -0400442 }
443 }
444
doru9104ac26b2020-10-13 18:23:28 +0300445 if (enable_k32w_lock_app_build) {
446 group("k32w_lock_app") {
Andrei Litvin41300eb2022-02-17 00:39:14 -0500447 deps = [ "${chip_root}/examples/lock-app/nxp/k32w/k32w0/(${chip_root}/config/k32w/toolchain:k32w_lock_app)" ]
doru9104ac26b2020-10-13 18:23:28 +0300448 }
449 }
450
Michael Spang18a5a402021-06-15 23:34:41 -0400451 if (enable_k32w_shell_app_build) {
452 group("k32w_shell_app") {
Andrei Litvin41300eb2022-02-17 00:39:14 -0500453 deps = [ "${chip_root}/examples/shell/nxp/k32w/k32w0/(${chip_root}/config/k32w/toolchain:k32w_shell_app)" ]
Michael Spang18a5a402021-06-15 23:34:41 -0400454 }
455 }
456
Michael Spangefa630b2020-07-08 22:23:08 -0400457 group("default") {
458 deps = []
459 if (enable_host_clang_build) {
Michael Spangb1139f72020-12-01 16:06:36 -0500460 deps += [ ":host_clang" ]
Michael Spangefa630b2020-07-08 22:23:08 -0400461 }
462 if (enable_host_gcc_build) {
Michael Spangb1139f72020-12-01 16:06:36 -0500463 deps += [ ":host_gcc" ]
Michael Spangefa630b2020-07-08 22:23:08 -0400464 }
Michael Spanga964fad2020-07-13 09:36:00 -0400465 if (enable_host_gcc_mbedtls_build) {
Michael Spangb1139f72020-12-01 16:06:36 -0500466 deps += [ ":host_gcc_mbedtls" ]
Michael Spangefa630b2020-07-08 22:23:08 -0400467 }
Michael Spangfdc49a32020-09-03 18:33:20 -0400468 if (enable_android_builds) {
469 deps += [
Michael Spangb1139f72020-12-01 16:06:36 -0500470 ":android_arm",
471 ":android_arm64",
472 ":android_x64",
473 ":android_x86",
Michael Spangfdc49a32020-09-03 18:33:20 -0400474 ]
475 }
Evgeny Margolis1486eb72021-07-12 20:18:00 -0700476 if (enable_standalone_chip_cert_build) {
477 deps += [ ":standalone_chip_cert" ]
478 }
Michael Spang8d085b32020-07-10 10:26:23 -0400479 if (enable_standalone_chip_tool_build) {
480 deps += [ ":standalone_chip_tool" ]
481 }
Vivien Nicolas87d46d52021-03-17 17:43:37 +0100482 if (enable_standalone_chip_tool_darwin_build) {
483 deps += [ ":standalone_chip_tool_darwin" ]
484 }
Michael Spang8d085b32020-07-10 10:26:23 -0400485 if (enable_standalone_shell_build) {
486 deps += [ ":standalone_shell" ]
487 }
Vivien Nicolas280d80f2020-11-06 22:56:40 +0100488 if (enable_linux_all_clusters_app_build) {
489 deps += [ ":linux_all_clusters_app" ]
490 }
chrisbeach59bb9a2392021-07-26 10:01:46 -0400491 if (enable_linux_thermostat_app_build) {
492 deps += [ ":linux_thermostat_app" ]
493 }
Lazar Kovacic7fe8c922021-05-18 03:46:21 +0200494 if (enable_linux_tv_app_build) {
495 deps += [ ":linux_tv_app" ]
496 }
Sharad Binjola2937f1a2021-08-24 14:25:16 -0700497 if (enable_linux_tv_casting_app_build) {
498 deps += [ ":linux_tv_casting_app" ]
499 }
Vivien Nicolas139e71d2021-02-16 19:12:41 +0100500 if (enable_linux_bridge_app_build) {
501 deps += [ ":linux_bridge_app" ]
502 }
Michael Spang7c8f19b2020-11-02 13:05:12 -0500503 if (enable_linux_lighting_app_build) {
504 deps += [ ":linux_lighting_app" ]
505 }
Dustin Crossmanb0063212022-01-04 09:19:36 -0800506 if (enable_linux_door_lock_app_build) {
507 deps += [ ":linux_door_lock_app" ]
508 }
jepenven-silabscec75ca2020-08-04 09:38:48 -0400509 if (enable_efr32_lock_app_build) {
510 deps += [ ":efr32_lock_app" ]
511 }
Michael Spangf8dc12e2021-02-02 21:36:46 -0500512 if (enable_efr32_lighting_app_build) {
513 deps += [ ":efr32_lighting_app" ]
514 }
cecille3588d782021-04-09 14:03:54 -0400515 if (enable_efr32_window_app_build) {
516 deps += [ ":efr32_window_app" ]
517 }
Praveen Chandran080ae572021-08-12 07:58:27 -0700518 if (enable_p6_lock_app_build) {
519 deps += [ ":p6_lock_app" ]
520 }
Michael Spang18a5a402021-06-15 23:34:41 -0400521 if (enable_k32w_lighting_app_build) {
522 deps += [ ":k32w_lighting_app" ]
523 }
doru9104ac26b2020-10-13 18:23:28 +0300524 if (enable_k32w_lock_app_build) {
525 deps += [ ":k32w_lock_app" ]
526 }
Michael Spang18a5a402021-06-15 23:34:41 -0400527 if (enable_k32w_shell_app_build) {
528 deps += [ ":k32w_shell_app" ]
529 }
Timothy Maes2478e022021-07-02 04:03:46 +0200530 if (enable_qpg_lock_app_build) {
531 deps += [ ":qpg_lock_app" ]
Michael Spangf8dc12e2021-02-02 21:36:46 -0500532 }
Michael Spang2891d6b2021-02-24 14:00:22 -0500533 if (enable_cc13x2x7_26x2x7_lock_app_build) {
534 deps += [ ":cc13x2x7_26x2x7_lock_app" ]
Michael Spangf8dc12e2021-02-02 21:36:46 -0500535 }
Michael Spangefa630b2020-07-08 22:23:08 -0400536 }
537
Michael Spangdf712982020-09-18 10:39:35 -0400538 group("check") {
539 deps = []
540 if (enable_host_clang_build) {
541 deps += [ ":check_host_clang" ]
542 }
543 if (enable_host_gcc_build) {
544 deps += [ ":check_host_gcc" ]
545 }
546 if (enable_host_gcc_mbedtls_build) {
547 deps += [ ":check_host_gcc_mbedtls" ]
Michael Spangefa630b2020-07-08 22:23:08 -0400548 }
C Freeman79c93152021-08-18 00:20:05 -0400549 if (enable_fake_tests) {
550 deps += [ ":check_fake_platform" ]
551 }
Michael Spangefa630b2020-07-08 22:23:08 -0400552 }
553}