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 | |
Łukasz Duda | 4e1faf2 | 2021-01-27 17:47:25 +0100 | [diff] [blame] | 15 | import("//build_overrides/build.gni") |
Michael Spang | efa630b | 2020-07-08 22:23:08 -0400 | [diff] [blame] | 16 | import("//build_overrides/chip.gni") |
| 17 | import("//build_overrides/mbedtls.gni") |
| 18 | import("//build_overrides/nlassert.gni") |
| 19 | import("//build_overrides/nlio.gni") |
| 20 | import("//build_overrides/nlunit_test.gni") |
| 21 | import("//build_overrides/pigweed.gni") |
Łukasz Duda | 4e1faf2 | 2021-01-27 17:47:25 +0100 | [diff] [blame] | 22 | |
Michael Spang | bad533e | 2021-03-09 01:28:51 -0500 | [diff] [blame] | 23 | import("//src/lwip/lwip.gni") |
Kamil Kasperczyk | d05149c | 2021-01-05 16:05:27 +0100 | [diff] [blame] | 24 | import("//src/platform/device.gni") |
szatmz | 2244db6 | 2020-12-04 14:42:01 -0500 | [diff] [blame] | 25 | import("$dir_pw_build/python.gni") |
Michael Spang | efa630b | 2020-07-08 22:23:08 -0400 | [diff] [blame] | 26 | |
| 27 | # This build file should not be used in superproject builds. |
| 28 | assert(chip_root == "//") |
| 29 | |
Michael Spang | 09611bf | 2021-03-02 16:31:57 -0500 | [diff] [blame] | 30 | import("${chip_root}/build/chip/tests.gni") |
| 31 | import("${chip_root}/build/chip/tools.gni") |
Michael Spang | efa630b | 2020-07-08 22:23:08 -0400 | [diff] [blame] | 32 | |
Evgeny Margolis | f0e9f91 | 2021-05-13 16:02:38 -0700 | [diff] [blame] | 33 | import("//src/crypto/crypto.gni") |
| 34 | |
Rob Mohr | 41c76b6 | 2021-06-02 12:43:21 -0700 | [diff] [blame] | 35 | if (current_toolchain != "${dir_pw_toolchain}/default:default") { |
Andrei Litvin | 2d86349 | 2020-10-02 17:28:58 -0400 | [diff] [blame] | 36 | declare_args() { |
Michael Spang | 4833d9c | 2020-10-09 09:33:02 -0400 | [diff] [blame] | 37 | chip_enable_python_modules = |
Song Guo | d652be4 | 2020-11-11 00:34:35 +0800 | [diff] [blame] | 38 | (current_os == "mac" || current_os == "linux") && |
| 39 | (host_cpu == "x64" || host_cpu == "arm64") |
Andrei Litvin | 2d86349 | 2020-10-02 17:28:58 -0400 | [diff] [blame] | 40 | } |
| 41 | |
szatmz | 2244db6 | 2020-12-04 14:42:01 -0500 | [diff] [blame] | 42 | # Python packages for supporting specific targets. |
| 43 | pw_python_group("python_packages") { |
| 44 | python_deps = [ |
Michael Spang | 4e8080b | 2021-02-12 15:03:57 -0500 | [diff] [blame] | 45 | "$dir_pw_build/py", |
| 46 | "$dir_pw_doctor/py", |
| 47 | "$dir_pw_env_setup/py", |
| 48 | "$dir_pw_hdlc/py", |
| 49 | "$dir_pw_module/py", |
| 50 | "$dir_pw_protobuf/py", |
| 51 | "$dir_pw_protobuf_compiler/py", |
| 52 | "$dir_pw_rpc/py", |
| 53 | "$dir_pw_status/py", |
| 54 | "$dir_pw_toolchain/py", |
| 55 | "$dir_pw_unit_test/py", |
| 56 | "$dir_pw_watch/py", |
szatmz | 2244db6 | 2020-12-04 14:42:01 -0500 | [diff] [blame] | 57 | "integrations/mobly:chip_mobly", |
Rob Mohr | 5cda0bd | 2021-04-10 01:23:15 -0700 | [diff] [blame] | 58 | "scripts:requirements", |
szatmz | 2244db6 | 2020-12-04 14:42:01 -0500 | [diff] [blame] | 59 | "third_party/happy", |
| 60 | ] |
| 61 | } |
| 62 | |
Michael Spang | efa630b | 2020-07-08 22:23:08 -0400 | [diff] [blame] | 63 | # This is a real toolchain. Build CHIP. |
| 64 | group("default") { |
Michael Spang | efa630b | 2020-07-08 22:23:08 -0400 | [diff] [blame] | 65 | deps = [ |
| 66 | "${chip_root}/src/app", |
| 67 | "${chip_root}/src/ble", |
Pankaj Garg | 750d1ee | 2021-04-23 11:50:06 -0700 | [diff] [blame] | 68 | "${chip_root}/src/channel", |
Michael Spang | efa630b | 2020-07-08 22:23:08 -0400 | [diff] [blame] | 69 | "${chip_root}/src/controller", |
Evgeny Margolis | 5353858 | 2021-01-12 09:14:24 -0800 | [diff] [blame] | 70 | "${chip_root}/src/credentials", |
Michael Spang | efa630b | 2020-07-08 22:23:08 -0400 | [diff] [blame] | 71 | "${chip_root}/src/crypto", |
| 72 | "${chip_root}/src/inet", |
| 73 | "${chip_root}/src/lib", |
Evgeny Margolis | df86212 | 2020-10-22 07:47:27 -0700 | [diff] [blame] | 74 | "${chip_root}/src/lib/asn1", |
Michael Spang | efa630b | 2020-07-08 22:23:08 -0400 | [diff] [blame] | 75 | "${chip_root}/src/lib/core", |
| 76 | "${chip_root}/src/lib/support", |
Yufeng Wang | 4fc19f1 | 2020-10-22 16:14:32 -0700 | [diff] [blame] | 77 | "${chip_root}/src/messaging", |
Yufeng Wang | a3d4054 | 2020-11-04 13:12:48 -0800 | [diff] [blame] | 78 | "${chip_root}/src/protocols", |
Rob Walker | b14e3e3 | 2020-08-20 13:59:22 -0700 | [diff] [blame] | 79 | "${chip_root}/src/setup_payload", |
Michael Spang | efa630b | 2020-07-08 22:23:08 -0400 | [diff] [blame] | 80 | "${chip_root}/src/system", |
| 81 | "${chip_root}/src/transport", |
| 82 | "${mbedtls_root}:mbedtls", |
| 83 | "${nlassert_root}:nlassert", |
| 84 | "${nlio_root}:nlio", |
| 85 | "${nlunit_test_root}:nlunit-test", |
| 86 | ] |
| 87 | |
Kamil Kasperczyk | d05149c | 2021-01-05 16:05:27 +0100 | [diff] [blame] | 88 | if (chip_device_platform != "none") { |
| 89 | deps += [ "${chip_root}/src/app/server" ] |
| 90 | } |
| 91 | |
Michael Spang | efa630b | 2020-07-08 22:23:08 -0400 | [diff] [blame] | 92 | if (chip_build_tests) { |
Rafał Kuźnia | 6b3ee1a | 2020-09-04 03:08:16 +0200 | [diff] [blame] | 93 | deps += [ "//src:tests" ] |
Michael Spang | efa630b | 2020-07-08 22:23:08 -0400 | [diff] [blame] | 94 | } |
| 95 | |
Michael Spang | bad533e | 2021-03-09 01:28:51 -0500 | [diff] [blame] | 96 | if (chip_with_lwip) { |
Michael Spang | e1c64e3 | 2021-06-21 14:53:44 -0400 | [diff] [blame] | 97 | deps += [ "${chip_root}/src/lwip" ] |
Michael Spang | bad533e | 2021-03-09 01:28:51 -0500 | [diff] [blame] | 98 | } |
| 99 | |
Michael Spang | efa630b | 2020-07-08 22:23:08 -0400 | [diff] [blame] | 100 | if (chip_build_tools) { |
| 101 | deps += [ |
Michael Spang | c8f7c69 | 2021-03-19 10:41:51 -0400 | [diff] [blame] | 102 | ":certification", |
Timothy Maes | 9e1ac48 | 2020-10-29 17:59:49 +0100 | [diff] [blame] | 103 | "${chip_root}/examples/shell/standalone:chip-shell", |
yunhanw-google | e430b1d | 2021-01-06 06:12:46 -0800 | [diff] [blame] | 104 | "${chip_root}/src/app/tests/integration:chip-im-initiator", |
| 105 | "${chip_root}/src/app/tests/integration:chip-im-responder", |
Yufeng Wang | 4282a07 | 2020-12-08 08:58:46 -0800 | [diff] [blame] | 106 | "${chip_root}/src/messaging/tests/echo:chip-echo-requester", |
| 107 | "${chip_root}/src/messaging/tests/echo:chip-echo-responder", |
Michael Spang | efa630b | 2020-07-08 22:23:08 -0400 | [diff] [blame] | 108 | "${chip_root}/src/qrcodetool", |
| 109 | "${chip_root}/src/setup_payload", |
| 110 | ] |
Evgeny Margolis | f0e9f91 | 2021-05-13 16:02:38 -0700 | [diff] [blame] | 111 | if (chip_crypto == "openssl") { |
| 112 | deps += [ "${chip_root}/src/tools/chip-cert" ] |
| 113 | } |
Andrei Litvin | 2d86349 | 2020-10-02 17:28:58 -0400 | [diff] [blame] | 114 | if (chip_enable_python_modules) { |
yunhanw-google | 90ea314 | 2020-10-01 13:53:26 -0700 | [diff] [blame] | 115 | deps += [ "${chip_root}/src/controller/python" ] |
| 116 | } |
Michael Spang | efa630b | 2020-07-08 22:23:08 -0400 | [diff] [blame] | 117 | } |
Andrei Litvin | d74a0b6 | 2020-08-30 19:58:00 -0400 | [diff] [blame] | 118 | |
| 119 | if (current_os == "android") { |
| 120 | deps += [ |
| 121 | "${chip_root}/src/controller/java", |
| 122 | "${chip_root}/src/setup_payload/java", |
| 123 | ] |
| 124 | } |
Michael Spang | efa630b | 2020-07-08 22:23:08 -0400 | [diff] [blame] | 125 | } |
| 126 | |
Michael Spang | c8f7c69 | 2021-03-19 10:41:51 -0400 | [diff] [blame] | 127 | if (chip_build_tools) { |
| 128 | group("certification") { |
| 129 | data_deps = [ "${chip_root}/examples/chip-tool" ] |
| 130 | |
| 131 | if (chip_enable_python_modules) { |
| 132 | data_deps += [ "${chip_root}/src/controller/python" ] |
| 133 | } |
| 134 | |
| 135 | write_runtime_deps = "${root_out_dir}/certification.runtime_deps" |
| 136 | } |
| 137 | } |
| 138 | |
Michael Spang | df71298 | 2020-09-18 10:39:35 -0400 | [diff] [blame] | 139 | group("check") { |
| 140 | if (chip_link_tests) { |
Rafał Kuźnia | 6b3ee1a | 2020-09-04 03:08:16 +0200 | [diff] [blame] | 141 | deps = [ "//src:tests_run" ] |
Michael Spang | efa630b | 2020-07-08 22:23:08 -0400 | [diff] [blame] | 142 | } |
| 143 | } |
Song Guo | 30123da | 2020-10-13 19:30:39 +0800 | [diff] [blame] | 144 | |
| 145 | # We don't always want to run happy tests, make them a seperate group. |
Michael Spang | 60a2807 | 2020-10-13 11:03:21 -0400 | [diff] [blame] | 146 | if (chip_enable_happy_tests) { |
| 147 | group("happy_tests") { |
| 148 | if (chip_link_tests) { |
| 149 | deps = [ "//src:happy_tests" ] |
| 150 | } |
Song Guo | 30123da | 2020-10-13 19:30:39 +0800 | [diff] [blame] | 151 | } |
| 152 | } |
Michael Spang | efa630b | 2020-07-08 22:23:08 -0400 | [diff] [blame] | 153 | } else { |
Michael Spang | f1af8fc | 2020-07-29 14:25:47 -0400 | [diff] [blame] | 154 | # This is the unified build. Configure various real toolchains. |
Michael Spang | 09611bf | 2021-03-02 16:31:57 -0500 | [diff] [blame] | 155 | import("${chip_root}/build/chip/chip_build.gni") |
Michael Spang | efa630b | 2020-07-08 22:23:08 -0400 | [diff] [blame] | 156 | declare_args() { |
| 157 | # Set this to false to disable all builds by default. |
| 158 | enable_default_builds = true |
Michael Spang | 8d085b3 | 2020-07-10 10:26:23 -0400 | [diff] [blame] | 159 | |
Michael Spang | fdc49a3 | 2020-09-03 18:33:20 -0400 | [diff] [blame] | 160 | # Enable building for Android. |
| 161 | enable_android_builds = false |
| 162 | |
Seth Rickard | 4f0521f | 2021-01-12 16:06:52 -0600 | [diff] [blame] | 163 | # Set this to true to enable TI builds by default. |
Michael Spang | 2891d6b | 2021-02-24 14:00:22 -0500 | [diff] [blame] | 164 | enable_ti_simplelink_builds = false |
Seth Rickard | 4f0521f | 2021-01-12 16:06:52 -0600 | [diff] [blame] | 165 | |
jepenven-silabs | cec75ca | 2020-08-04 09:38:48 -0400 | [diff] [blame] | 166 | # Set this to true to enable efr32 builds by default. |
| 167 | enable_efr32_builds = false |
Timothy Maes | b5b3d38 | 2020-10-05 16:59:21 +0200 | [diff] [blame] | 168 | |
Timothy Maes | 2478e02 | 2021-07-02 04:03:46 +0200 | [diff] [blame] | 169 | # Set this to true to enable Qorvo qpg builds by default. |
| 170 | enable_qpg_builds = false |
doru91 | 04ac26b | 2020-10-13 18:23:28 +0300 | [diff] [blame] | 171 | |
| 172 | # Set this to true to enable k32w builds by default. |
| 173 | enable_k32w_builds = false |
Michael Spang | efa630b | 2020-07-08 22:23:08 -0400 | [diff] [blame] | 174 | } |
| 175 | |
| 176 | declare_args() { |
| 177 | # Enable building chip with clang. |
Michael Spang | cd0f611 | 2021-01-22 17:06:25 -0500 | [diff] [blame] | 178 | enable_host_clang_build = enable_default_builds && host_os != "win" |
Michael Spang | efa630b | 2020-07-08 22:23:08 -0400 | [diff] [blame] | 179 | |
| 180 | # Enable building chip with gcc. |
Michael Spang | cd0f611 | 2021-01-22 17:06:25 -0500 | [diff] [blame] | 181 | enable_host_gcc_build = enable_default_builds && host_os != "win" |
Michael Spang | efa630b | 2020-07-08 22:23:08 -0400 | [diff] [blame] | 182 | |
Michael Spang | a964fad | 2020-07-13 09:36:00 -0400 | [diff] [blame] | 183 | # Enable building chip with gcc & mbedtls. |
Michael Spang | cd0f611 | 2021-01-22 17:06:25 -0500 | [diff] [blame] | 184 | enable_host_gcc_mbedtls_build = enable_default_builds && host_os != "win" |
Michael Spang | a964fad | 2020-07-13 09:36:00 -0400 | [diff] [blame] | 185 | |
Evgeny Margolis | 1486eb7 | 2021-07-12 20:18:00 -0700 | [diff] [blame^] | 186 | # Build the chip-cert tool. |
| 187 | enable_standalone_chip_cert_build = |
| 188 | enable_default_builds && host_os != "win" && chip_crypto == "openssl" |
| 189 | |
Michael Spang | 8d085b3 | 2020-07-10 10:26:23 -0400 | [diff] [blame] | 190 | # Build the chip-tool example. |
Michael Spang | cd0f611 | 2021-01-22 17:06:25 -0500 | [diff] [blame] | 191 | enable_standalone_chip_tool_build = |
| 192 | enable_default_builds && host_os != "win" |
Michael Spang | 8d085b3 | 2020-07-10 10:26:23 -0400 | [diff] [blame] | 193 | |
Vivien Nicolas | 87d46d5 | 2021-03-17 17:43:37 +0100 | [diff] [blame] | 194 | # Build the chip-tool-darwin example. |
| 195 | enable_standalone_chip_tool_darwin_build = |
| 196 | enable_default_builds && host_os == "mac" |
| 197 | |
Michael Spang | 8d085b3 | 2020-07-10 10:26:23 -0400 | [diff] [blame] | 198 | # Build the shell example. |
Michael Spang | cd0f611 | 2021-01-22 17:06:25 -0500 | [diff] [blame] | 199 | enable_standalone_shell_build = enable_default_builds && host_os != "win" |
Michael Spang | 8d085b3 | 2020-07-10 10:26:23 -0400 | [diff] [blame] | 200 | |
Vivien Nicolas | 280d80f | 2020-11-06 22:56:40 +0100 | [diff] [blame] | 201 | # Build the Linux all clusters app example. |
| 202 | enable_linux_all_clusters_app_build = |
Vivien Nicolas | 1b29655 | 2020-12-07 18:24:57 +0100 | [diff] [blame] | 203 | enable_default_builds && (host_os == "linux" || host_os == "mac") |
Vivien Nicolas | 280d80f | 2020-11-06 22:56:40 +0100 | [diff] [blame] | 204 | |
Lazar Kovacic | 7fe8c92 | 2021-05-18 03:46:21 +0200 | [diff] [blame] | 205 | # Build the Linux tv app example. |
| 206 | enable_linux_tv_app_build = |
| 207 | enable_default_builds && (host_os == "linux" || host_os == "mac") |
| 208 | |
Vivien Nicolas | 139e71d | 2021-02-16 19:12:41 +0100 | [diff] [blame] | 209 | # Build the Linux bridge app example. |
| 210 | enable_linux_bridge_app_build = |
| 211 | enable_default_builds && (host_os == "linux" || host_os == "mac") |
| 212 | |
Michael Spang | 7c8f19b | 2020-11-02 13:05:12 -0500 | [diff] [blame] | 213 | # Build the Linux lighting app example. |
| 214 | enable_linux_lighting_app_build = |
Vivien Nicolas | 1b29655 | 2020-12-07 18:24:57 +0100 | [diff] [blame] | 215 | enable_default_builds && (host_os == "linux" || host_os == "mac") |
Michael Spang | 7c8f19b | 2020-11-02 13:05:12 -0500 | [diff] [blame] | 216 | |
Michael Spang | 2891d6b | 2021-02-24 14:00:22 -0500 | [diff] [blame] | 217 | # Build the cc13x2x7_26x2x7 lock app example. |
| 218 | enable_cc13x2x7_26x2x7_lock_app_build = enable_ti_simplelink_builds |
Seth Rickard | 4f0521f | 2021-01-12 16:06:52 -0600 | [diff] [blame] | 219 | |
jepenven-silabs | cec75ca | 2020-08-04 09:38:48 -0400 | [diff] [blame] | 220 | # Build the efr32 lock app example. |
| 221 | enable_efr32_lock_app_build = enable_efr32_builds |
Michael Spang | 0241373 | 2020-09-24 09:45:17 -0400 | [diff] [blame] | 222 | |
Timothy Maes | 2478e02 | 2021-07-02 04:03:46 +0200 | [diff] [blame] | 223 | # Build the qpgxxxx lock app example. |
Michael Spang | 706874a | 2021-07-02 21:45:45 -0400 | [diff] [blame] | 224 | enable_qpg_lock_app_build = enable_qpg_builds && !is_debug |
Timothy Maes | b5b3d38 | 2020-10-05 16:59:21 +0200 | [diff] [blame] | 225 | |
Michael Spang | 0241373 | 2020-09-24 09:45:17 -0400 | [diff] [blame] | 226 | # Build the efr32 lighting app example. |
| 227 | enable_efr32_lighting_app_build = enable_efr32_builds |
doru91 | 04ac26b | 2020-10-13 18:23:28 +0300 | [diff] [blame] | 228 | |
cecille | 3588d78 | 2021-04-09 14:03:54 -0400 | [diff] [blame] | 229 | # Build the efr32 window app example. |
| 230 | enable_efr32_window_app_build = enable_efr32_builds |
| 231 | |
Michael Spang | 18a5a40 | 2021-06-15 23:34:41 -0400 | [diff] [blame] | 232 | # Build the k32w lighting app example. |
| 233 | enable_k32w_lighting_app_build = enable_k32w_builds |
| 234 | |
doru91 | 04ac26b | 2020-10-13 18:23:28 +0300 | [diff] [blame] | 235 | # Build the k32w lock app example. |
| 236 | enable_k32w_lock_app_build = enable_k32w_builds |
Michael Spang | 18a5a40 | 2021-06-15 23:34:41 -0400 | [diff] [blame] | 237 | |
| 238 | # Build the k32w shell app example. |
| 239 | enable_k32w_shell_app_build = enable_k32w_builds |
Michael Spang | efa630b | 2020-07-08 22:23:08 -0400 | [diff] [blame] | 240 | } |
| 241 | |
Michael Spang | 7c8f19b | 2020-11-02 13:05:12 -0500 | [diff] [blame] | 242 | if (enable_host_clang_build) { |
| 243 | chip_build("host_clang") { |
Łukasz Duda | 4e1faf2 | 2021-01-27 17:47:25 +0100 | [diff] [blame] | 244 | toolchain = "${build_root}/toolchain/host:${host_os}_${host_cpu}_clang" |
Michael Spang | 7c8f19b | 2020-11-02 13:05:12 -0500 | [diff] [blame] | 245 | } |
Michael Spang | efa630b | 2020-07-08 22:23:08 -0400 | [diff] [blame] | 246 | } |
| 247 | |
Michael Spang | 7c8f19b | 2020-11-02 13:05:12 -0500 | [diff] [blame] | 248 | if (enable_host_gcc_build) { |
| 249 | chip_build("host_gcc") { |
Łukasz Duda | 4e1faf2 | 2021-01-27 17:47:25 +0100 | [diff] [blame] | 250 | toolchain = "${build_root}/toolchain/host:${host_os}_${host_cpu}_gcc" |
Michael Spang | 7c8f19b | 2020-11-02 13:05:12 -0500 | [diff] [blame] | 251 | } |
Michael Spang | efa630b | 2020-07-08 22:23:08 -0400 | [diff] [blame] | 252 | } |
| 253 | |
Michael Spang | 7c8f19b | 2020-11-02 13:05:12 -0500 | [diff] [blame] | 254 | if (enable_host_gcc_mbedtls_build) { |
| 255 | chip_build("host_gcc_mbedtls") { |
| 256 | toolchain = "${chip_root}/config/mbedtls/toolchain:${host_os}_${host_cpu}_gcc_mbedtls" |
| 257 | } |
Michael Spang | 8d085b3 | 2020-07-10 10:26:23 -0400 | [diff] [blame] | 258 | } |
| 259 | |
Michael Spang | fdc49a3 | 2020-09-03 18:33:20 -0400 | [diff] [blame] | 260 | if (enable_android_builds) { |
| 261 | chip_build("android_arm") { |
Łukasz Duda | 4e1faf2 | 2021-01-27 17:47:25 +0100 | [diff] [blame] | 262 | toolchain = "${build_root}/toolchain/android:android_arm" |
Michael Spang | fdc49a3 | 2020-09-03 18:33:20 -0400 | [diff] [blame] | 263 | } |
| 264 | |
| 265 | chip_build("android_arm64") { |
Łukasz Duda | 4e1faf2 | 2021-01-27 17:47:25 +0100 | [diff] [blame] | 266 | toolchain = "${build_root}/toolchain/android:android_arm64" |
Michael Spang | fdc49a3 | 2020-09-03 18:33:20 -0400 | [diff] [blame] | 267 | } |
| 268 | |
| 269 | chip_build("android_x64") { |
Łukasz Duda | 4e1faf2 | 2021-01-27 17:47:25 +0100 | [diff] [blame] | 270 | toolchain = "${build_root}/toolchain/android:android_x64" |
Michael Spang | fdc49a3 | 2020-09-03 18:33:20 -0400 | [diff] [blame] | 271 | } |
| 272 | |
| 273 | chip_build("android_x86") { |
Łukasz Duda | 4e1faf2 | 2021-01-27 17:47:25 +0100 | [diff] [blame] | 274 | toolchain = "${build_root}/toolchain/android:android_x86" |
Michael Spang | fdc49a3 | 2020-09-03 18:33:20 -0400 | [diff] [blame] | 275 | } |
| 276 | } |
| 277 | |
Michael Spang | 8d085b3 | 2020-07-10 10:26:23 -0400 | [diff] [blame] | 278 | standalone_toolchain = "${chip_root}/config/standalone/toolchain:standalone" |
Michael Spang | f92b73d | 2021-01-05 10:31:03 -0500 | [diff] [blame] | 279 | not_needed([ "standalone_toolchain" ]) # Might not be needed. |
Michael Spang | 8d085b3 | 2020-07-10 10:26:23 -0400 | [diff] [blame] | 280 | |
Evgeny Margolis | 1486eb7 | 2021-07-12 20:18:00 -0700 | [diff] [blame^] | 281 | if (enable_standalone_chip_cert_build) { |
| 282 | group("standalone_chip_cert") { |
| 283 | deps = [ "${chip_root}/src/tools/chip-cert(${standalone_toolchain})" ] |
| 284 | } |
| 285 | } |
| 286 | |
Michael Spang | 7c8f19b | 2020-11-02 13:05:12 -0500 | [diff] [blame] | 287 | if (enable_standalone_chip_tool_build) { |
| 288 | group("standalone_chip_tool") { |
| 289 | deps = [ "${chip_root}/examples/chip-tool(${standalone_toolchain})" ] |
| 290 | } |
Michael Spang | 8d085b3 | 2020-07-10 10:26:23 -0400 | [diff] [blame] | 291 | } |
| 292 | |
Vivien Nicolas | 87d46d5 | 2021-03-17 17:43:37 +0100 | [diff] [blame] | 293 | if (enable_standalone_chip_tool_darwin_build) { |
| 294 | group("standalone_chip_tool_darwin") { |
| 295 | deps = |
| 296 | [ "${chip_root}/examples/chip-tool-darwin(${standalone_toolchain})" ] |
| 297 | } |
| 298 | } |
| 299 | |
Michael Spang | 2891d6b | 2021-02-24 14:00:22 -0500 | [diff] [blame] | 300 | if (enable_cc13x2x7_26x2x7_lock_app_build) { |
| 301 | group("cc13x2x7_26x2x7_lock_app") { |
| 302 | deps = [ "${chip_root}/examples/lock-app/cc13x2x7_26x2x7(${chip_root}/config/cc13x2_26x2/toolchain:cc13x2x7_26x2x7_lock_app)" ] |
Seth Rickard | 4f0521f | 2021-01-12 16:06:52 -0600 | [diff] [blame] | 303 | } |
| 304 | } |
| 305 | |
Michael Spang | 7c8f19b | 2020-11-02 13:05:12 -0500 | [diff] [blame] | 306 | if (enable_standalone_shell_build) { |
| 307 | group("standalone_shell") { |
| 308 | deps = |
| 309 | [ "${chip_root}/examples/shell/standalone(${standalone_toolchain})" ] |
| 310 | } |
| 311 | } |
| 312 | |
Vivien Nicolas | 280d80f | 2020-11-06 22:56:40 +0100 | [diff] [blame] | 313 | if (enable_linux_all_clusters_app_build) { |
| 314 | group("linux_all_clusters_app") { |
| 315 | deps = [ |
| 316 | "${chip_root}/examples/all-clusters-app/linux(${standalone_toolchain})", |
| 317 | ] |
| 318 | } |
| 319 | } |
| 320 | |
Lazar Kovacic | 7fe8c92 | 2021-05-18 03:46:21 +0200 | [diff] [blame] | 321 | if (enable_linux_tv_app_build) { |
| 322 | group("linux_tv_app") { |
| 323 | deps = [ "${chip_root}/examples/tv-app/linux(${standalone_toolchain})" ] |
| 324 | } |
| 325 | } |
| 326 | |
Vivien Nicolas | 139e71d | 2021-02-16 19:12:41 +0100 | [diff] [blame] | 327 | if (enable_linux_bridge_app_build) { |
| 328 | group("linux_bridge_app") { |
| 329 | deps = |
| 330 | [ "${chip_root}/examples/bridge-app/linux(${standalone_toolchain})" ] |
| 331 | } |
| 332 | } |
| 333 | |
Michael Spang | 7c8f19b | 2020-11-02 13:05:12 -0500 | [diff] [blame] | 334 | if (enable_linux_lighting_app_build) { |
| 335 | group("linux_lighting_app") { |
| 336 | deps = [ |
| 337 | "${chip_root}/examples/lighting-app/linux(${standalone_toolchain})", |
| 338 | ] |
| 339 | } |
Michael Spang | 8d085b3 | 2020-07-10 10:26:23 -0400 | [diff] [blame] | 340 | } |
| 341 | |
jepenven-silabs | cec75ca | 2020-08-04 09:38:48 -0400 | [diff] [blame] | 342 | if (enable_efr32_lock_app_build) { |
| 343 | group("efr32_lock_app") { |
| 344 | deps = [ "${chip_root}/examples/lock-app/efr32(${chip_root}/config/efr32/toolchain:efr32_lock_app)" ] |
| 345 | } |
| 346 | } |
| 347 | |
Timothy Maes | 2478e02 | 2021-07-02 04:03:46 +0200 | [diff] [blame] | 348 | if (enable_qpg_lock_app_build) { |
| 349 | group("qpg_lock_app") { |
| 350 | deps = [ "${chip_root}/examples/lock-app/qpg(${chip_root}/config/qpg/toolchain:qpg_lock_app)" ] |
Timothy Maes | b5b3d38 | 2020-10-05 16:59:21 +0200 | [diff] [blame] | 351 | } |
| 352 | } |
| 353 | |
Michael Spang | 0241373 | 2020-09-24 09:45:17 -0400 | [diff] [blame] | 354 | if (enable_efr32_lighting_app_build) { |
| 355 | group("efr32_lighting_app") { |
| 356 | deps = [ "${chip_root}/examples/lighting-app/efr32(${chip_root}/config/efr32/toolchain:efr32_lighting_app)" ] |
| 357 | } |
| 358 | } |
| 359 | |
cecille | 3588d78 | 2021-04-09 14:03:54 -0400 | [diff] [blame] | 360 | if (enable_efr32_window_app_build) { |
| 361 | group("efr32_window_app") { |
| 362 | deps = [ "${chip_root}/examples/window-app/efr32(${chip_root}/config/efr32/toolchain:efr32_window_app)" ] |
| 363 | } |
| 364 | } |
| 365 | |
Michael Spang | 18a5a40 | 2021-06-15 23:34:41 -0400 | [diff] [blame] | 366 | if (enable_k32w_lighting_app_build) { |
| 367 | group("k32w_lighting_app") { |
| 368 | deps = [ "${chip_root}/examples/lighting-app/k32w(${chip_root}/config/k32w/toolchain:k32w_lighting_app)" ] |
| 369 | } |
| 370 | } |
| 371 | |
doru91 | 04ac26b | 2020-10-13 18:23:28 +0300 | [diff] [blame] | 372 | if (enable_k32w_lock_app_build) { |
| 373 | group("k32w_lock_app") { |
| 374 | deps = [ "${chip_root}/examples/lock-app/k32w(${chip_root}/config/k32w/toolchain:k32w_lock_app)" ] |
| 375 | } |
| 376 | } |
| 377 | |
Michael Spang | 18a5a40 | 2021-06-15 23:34:41 -0400 | [diff] [blame] | 378 | if (enable_k32w_shell_app_build) { |
| 379 | group("k32w_shell_app") { |
| 380 | deps = [ "${chip_root}/examples/shell/k32w(${chip_root}/config/k32w/toolchain:k32w_shell_app)" ] |
| 381 | } |
| 382 | } |
| 383 | |
Michael Spang | efa630b | 2020-07-08 22:23:08 -0400 | [diff] [blame] | 384 | group("default") { |
| 385 | deps = [] |
| 386 | if (enable_host_clang_build) { |
Michael Spang | b1139f7 | 2020-12-01 16:06:36 -0500 | [diff] [blame] | 387 | deps += [ ":host_clang" ] |
Michael Spang | efa630b | 2020-07-08 22:23:08 -0400 | [diff] [blame] | 388 | } |
| 389 | if (enable_host_gcc_build) { |
Michael Spang | b1139f7 | 2020-12-01 16:06:36 -0500 | [diff] [blame] | 390 | deps += [ ":host_gcc" ] |
Michael Spang | efa630b | 2020-07-08 22:23:08 -0400 | [diff] [blame] | 391 | } |
Michael Spang | a964fad | 2020-07-13 09:36:00 -0400 | [diff] [blame] | 392 | if (enable_host_gcc_mbedtls_build) { |
Michael Spang | b1139f7 | 2020-12-01 16:06:36 -0500 | [diff] [blame] | 393 | deps += [ ":host_gcc_mbedtls" ] |
Michael Spang | efa630b | 2020-07-08 22:23:08 -0400 | [diff] [blame] | 394 | } |
Michael Spang | fdc49a3 | 2020-09-03 18:33:20 -0400 | [diff] [blame] | 395 | if (enable_android_builds) { |
| 396 | deps += [ |
Michael Spang | b1139f7 | 2020-12-01 16:06:36 -0500 | [diff] [blame] | 397 | ":android_arm", |
| 398 | ":android_arm64", |
| 399 | ":android_x64", |
| 400 | ":android_x86", |
Michael Spang | fdc49a3 | 2020-09-03 18:33:20 -0400 | [diff] [blame] | 401 | ] |
| 402 | } |
Evgeny Margolis | 1486eb7 | 2021-07-12 20:18:00 -0700 | [diff] [blame^] | 403 | if (enable_standalone_chip_cert_build) { |
| 404 | deps += [ ":standalone_chip_cert" ] |
| 405 | } |
Michael Spang | 8d085b3 | 2020-07-10 10:26:23 -0400 | [diff] [blame] | 406 | if (enable_standalone_chip_tool_build) { |
| 407 | deps += [ ":standalone_chip_tool" ] |
| 408 | } |
Vivien Nicolas | 87d46d5 | 2021-03-17 17:43:37 +0100 | [diff] [blame] | 409 | if (enable_standalone_chip_tool_darwin_build) { |
| 410 | deps += [ ":standalone_chip_tool_darwin" ] |
| 411 | } |
Michael Spang | 8d085b3 | 2020-07-10 10:26:23 -0400 | [diff] [blame] | 412 | if (enable_standalone_shell_build) { |
| 413 | deps += [ ":standalone_shell" ] |
| 414 | } |
Vivien Nicolas | 280d80f | 2020-11-06 22:56:40 +0100 | [diff] [blame] | 415 | if (enable_linux_all_clusters_app_build) { |
| 416 | deps += [ ":linux_all_clusters_app" ] |
| 417 | } |
Lazar Kovacic | 7fe8c92 | 2021-05-18 03:46:21 +0200 | [diff] [blame] | 418 | if (enable_linux_tv_app_build) { |
| 419 | deps += [ ":linux_tv_app" ] |
| 420 | } |
Vivien Nicolas | 139e71d | 2021-02-16 19:12:41 +0100 | [diff] [blame] | 421 | if (enable_linux_bridge_app_build) { |
| 422 | deps += [ ":linux_bridge_app" ] |
| 423 | } |
Michael Spang | 7c8f19b | 2020-11-02 13:05:12 -0500 | [diff] [blame] | 424 | if (enable_linux_lighting_app_build) { |
| 425 | deps += [ ":linux_lighting_app" ] |
| 426 | } |
jepenven-silabs | cec75ca | 2020-08-04 09:38:48 -0400 | [diff] [blame] | 427 | if (enable_efr32_lock_app_build) { |
| 428 | deps += [ ":efr32_lock_app" ] |
| 429 | } |
Michael Spang | f8dc12e | 2021-02-02 21:36:46 -0500 | [diff] [blame] | 430 | if (enable_efr32_lighting_app_build) { |
| 431 | deps += [ ":efr32_lighting_app" ] |
| 432 | } |
cecille | 3588d78 | 2021-04-09 14:03:54 -0400 | [diff] [blame] | 433 | if (enable_efr32_window_app_build) { |
| 434 | deps += [ ":efr32_window_app" ] |
| 435 | } |
Michael Spang | 18a5a40 | 2021-06-15 23:34:41 -0400 | [diff] [blame] | 436 | if (enable_k32w_lighting_app_build) { |
| 437 | deps += [ ":k32w_lighting_app" ] |
| 438 | } |
doru91 | 04ac26b | 2020-10-13 18:23:28 +0300 | [diff] [blame] | 439 | if (enable_k32w_lock_app_build) { |
| 440 | deps += [ ":k32w_lock_app" ] |
| 441 | } |
Michael Spang | 18a5a40 | 2021-06-15 23:34:41 -0400 | [diff] [blame] | 442 | if (enable_k32w_shell_app_build) { |
| 443 | deps += [ ":k32w_shell_app" ] |
| 444 | } |
Timothy Maes | 2478e02 | 2021-07-02 04:03:46 +0200 | [diff] [blame] | 445 | if (enable_qpg_lock_app_build) { |
| 446 | deps += [ ":qpg_lock_app" ] |
Michael Spang | f8dc12e | 2021-02-02 21:36:46 -0500 | [diff] [blame] | 447 | } |
Michael Spang | 2891d6b | 2021-02-24 14:00:22 -0500 | [diff] [blame] | 448 | if (enable_cc13x2x7_26x2x7_lock_app_build) { |
| 449 | deps += [ ":cc13x2x7_26x2x7_lock_app" ] |
Michael Spang | f8dc12e | 2021-02-02 21:36:46 -0500 | [diff] [blame] | 450 | } |
Michael Spang | efa630b | 2020-07-08 22:23:08 -0400 | [diff] [blame] | 451 | } |
| 452 | |
Michael Spang | df71298 | 2020-09-18 10:39:35 -0400 | [diff] [blame] | 453 | group("check") { |
| 454 | deps = [] |
| 455 | if (enable_host_clang_build) { |
| 456 | deps += [ ":check_host_clang" ] |
| 457 | } |
| 458 | if (enable_host_gcc_build) { |
| 459 | deps += [ ":check_host_gcc" ] |
| 460 | } |
| 461 | if (enable_host_gcc_mbedtls_build) { |
| 462 | deps += [ ":check_host_gcc_mbedtls" ] |
Michael Spang | efa630b | 2020-07-08 22:23:08 -0400 | [diff] [blame] | 463 | } |
| 464 | } |
| 465 | } |