blob: 3e0e4d2da2dfc7a29fbc84306f3d32a97ebf31c1 [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/jlink.gni")
import("//build_overrides/openthread.gni")
config("libopenthread-platform_config") {
include_dirs = [ "${openthread_root}/examples/platforms" ]
}
copy("copy_openthread_system") {
sources = [ "${openthread_root}/examples/platforms/openthread-system.h" ]
outputs =
[ "${root_gen_dir}/include/openthread/platform/{{source_file_part}}" ]
}
source_set("openthread_system") {
sources =
[ "${root_gen_dir}/include/openthread/platform/openthread-system.h" ]
deps = [ ":copy_openthread_system" ]
}
source_set("libopenthread-platform") {
sources = [ "${openthread_root}/examples/platforms/openthread-system.h" ]
public_deps = [ ":openthread_system" ]
public_configs = [ ":libopenthread-platform_config" ]
}
static_library("libopenthread-platform-utils") {
sources = [
"${openthread_root}/examples/platforms/utils/code_utils.h",
"${openthread_root}/examples/platforms/utils/debug_uart.c",
"${openthread_root}/examples/platforms/utils/encoding.h",
"${openthread_root}/examples/platforms/utils/logging_rtt.c",
"${openthread_root}/examples/platforms/utils/logging_rtt.h",
"${openthread_root}/examples/platforms/utils/mac_frame.cpp",
"${openthread_root}/examples/platforms/utils/mac_frame.h",
"${openthread_root}/examples/platforms/utils/settings.h",
"${openthread_root}/examples/platforms/utils/settings_ram.c",
"${openthread_root}/examples/platforms/utils/soft_source_match_table.c",
"${openthread_root}/examples/platforms/utils/soft_source_match_table.h",
]
public_deps = [
"${openthread_root}/src/core:libopenthread_core_headers",
"${segger_rtt_root}:segger_rtt",
]
public_configs = [ ":libopenthread-platform_config" ]
}