blob: 3701330b0f71133eccf96ad886bc18b9bde81cd4 [file] [log] [blame]
# Copyright (c) 2020 Project CHIP Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import("//build_overrides/build.gni")
import("//build_overrides/chip.gni")
import("//build_overrides/cyw30739_sdk.gni")
import("${cyw30739_sdk_build_root}/cyw30739_executable.gni")
import("${cyw30739_sdk_build_root}/cyw30739_sdk.gni")
cyw30739_project_dir =
"${chip_root}/examples/ota-requestor-app/infineon/cyw30739"
examples_plat_dir = "${chip_root}/examples/platform/infineon/cyw30739"
declare_args() {
setupPinCode = 20202021
setupDiscriminator = 3840
}
cyw30739_sdk("sdk") {
sources = [ "${cyw30739_project_dir}/include/CHIPProjectConfig.h" ]
include_dirs = [
"${cyw30739_project_dir}/include",
"${examples_plat_dir}",
]
defines = [
"CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE=${setupPinCode}",
"CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR=${setupDiscriminator}",
]
}
cyw30739_executable("ota_requestor_app") {
output_name = "chip-cyw30739-ota-requestor-example.elf"
sources = [ "src/main.cpp" ]
deps = [
":sdk",
"${chip_root}/examples/ota-requestor-app/ota-requestor-common",
"${chip_root}/examples/shell/shell_common:shell_common",
"${chip_root}/src/lib",
]
include_dirs = [ "include" ]
if (chip_enable_ota_requestor) {
sources += [
"${examples_plat_dir}/OTAConfig.cpp",
"${examples_plat_dir}/OTAConfig.h",
]
}
}
group("cyw30739") {
deps = [ ":ota_requestor_app" ]
}
group("default") {
deps = [ ":cyw30739" ]
}