blob: 89546a7f7daf1f3cb331cb62d63a790caf6b09d1 [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/chip.gni")
import("//build_overrides/efr32_sdk.gni")
import("//build_overrides/openthread.gni")
import("${efr32_sdk_build_root}/efr32_sdk.gni")
import("${efr32_sdk_build_root}/silabs_board.gni")
openthread_efr32_root = "${chip_root}/third_party/openthread/ot-efr32"
config("openthread_efr32_config") {
defines = [
"RADIO_CONFIG_DMP_SUPPORT=1",
"${silabs_board}=1",
"${silabs_mcu}",
]
include_dirs = [
"${chip_root}/examples/platform/efr32",
"${sdk_support_root}/matter/efr32/${silabs_family}/${silabs_board}",
"${openthread_efr32_root}/src/src",
]
}
source_set("openthread_core_config_efr32") {
sources = [
"${openthread_efr32_root}/openthread/src/cli/cli_config.h",
"${openthread_efr32_root}/src/src/openthread-core-efr32-config-check.h",
"${openthread_efr32_root}/src/src/openthread-core-efr32-config.h",
]
public_deps = [ "${efr32_sdk_build_root}:efr32_sdk" ]
public_configs = [ ":openthread_efr32_config" ]
}
source_set("libopenthread-efr32") {
sources = [
"${openthread_efr32_root}/openthread/examples/apps/cli/cli_uart.cpp",
"${openthread_efr32_root}/src/src/alarm.c",
"${openthread_efr32_root}/src/src/crypto.c",
"${openthread_efr32_root}/src/src/entropy.c",
"${openthread_efr32_root}/src/src/flash.c",
"${openthread_efr32_root}/src/src/misc.c",
"${openthread_efr32_root}/src/src/radio.c",
"${openthread_efr32_root}/src/src/security_manager.c",
"${openthread_efr32_root}/src/src/sleep.c",
"${openthread_efr32_root}/src/src/system.c",
]
public_deps = [
":openthread_core_config_efr32",
"${openthread_efr32_root}/openthread/src/core:libopenthread_core_headers",
"..:libopenthread-platform",
"..:libopenthread-platform-utils",
]
}