| # 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/chip.gni") |
| import("//build_overrides/openthread.gni") |
| import("//build_overrides/qpg_sdk.gni") |
| |
| import("${qpg_sdk_build_root}/qpg_sdk.gni") |
| |
| # QPGxxxx settings and OT glue code |
| openthread_qpg_family = "${qpg_target_ic}" |
| openthread_qpg_root = "${chip_root}/third_party/openthread/ot-qorvo" |
| |
| config("openthread_qpg_config") { |
| include_dirs = [ "${openthread_qpg_root}/src/${openthread_qpg_family}" ] |
| |
| include_dirs += [ "${chip_root}/examples/platform/qpg" ] |
| } |
| |
| source_set("openthread_core_config_qpg") { |
| sources = [ |
| "${openthread_qpg_root}/src/${openthread_qpg_family}/openthread-core-${openthread_qpg_family}-config-check.h", |
| "${openthread_qpg_root}/src/${openthread_qpg_family}/openthread-core-${openthread_qpg_family}-config.h", |
| ] |
| |
| public_deps = [ "${qpg_sdk_build_root}:qpg_sdk" ] |
| |
| public_configs = [ ":openthread_qpg_config" ] |
| } |
| |
| source_set("openthread_mbedtls_config_qpg") { |
| sources = [ "${openthread_qpg_root}/src/${openthread_qpg_family}/crypto/${openthread_qpg_family}-mbedtls-config.h" ] |
| } |
| |
| source_set("libopenthread-qpg") { |
| sources = [ |
| "${openthread_qpg_root}/src/${openthread_qpg_family}/alarm.c", |
| "${openthread_qpg_root}/src/${openthread_qpg_family}/diag.c", |
| "${openthread_qpg_root}/src/${openthread_qpg_family}/entropy.c", |
| "${openthread_qpg_root}/src/${openthread_qpg_family}/logging.c", |
| "${openthread_qpg_root}/src/${openthread_qpg_family}/misc.c", |
| "${openthread_qpg_root}/src/${openthread_qpg_family}/platform.c", |
| "${openthread_qpg_root}/src/${openthread_qpg_family}/radio.c", |
| "${openthread_qpg_root}/src/${openthread_qpg_family}/settings.cpp", |
| "${openthread_qpg_root}/src/${openthread_qpg_family}/uart.c", |
| ] |
| |
| include_dirs = [ "${openthread_qpg_root}/src/${openthread_qpg_family}" ] |
| |
| sources += [ |
| "${openthread_root}/examples/apps/cli/cli_uart.cpp", |
| "${openthread_root}/src/cli/cli_config.h", |
| ] |
| include_dirs += [ "${openthread_root}/examples/apps" ] |
| |
| public_deps = [ |
| ":openthread_core_config_qpg", |
| "${openthread_root}/src/core:libopenthread_core_headers", |
| "..:libopenthread-platform", |
| "..:libopenthread-platform-utils", |
| ] |
| } |