blob: 1d8f0d1f4945181bec2234f3b7fac2528d19986c [file] [log] [blame] [edit]
# Copyright 2020 The Fuchsia Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build/config/fuchsia/rules.gni")
import("//src/sys/build/components.gni")
# In file included from ../../src/connectivity/openthread/ot-stack/src/app.cc:17:
# In file included from ../../src/connectivity/openthread/third_party/openthread/platform/radio.h:17:
# In file included from ../../third_party/openthread/src/lib/spinel/radio_spinel.hpp:885:
# ../../third_party/openthread/src/lib/spinel/radio_spinel_impl.hpp:80:16: error: 'static' function 'SpinelStatusToOtError' declared in header file should be declared 'static inline' [-Werror,-Wunneeded-internal-declaration]
# static otError SpinelStatusToOtError(spinel_status_t aError)
# ^
# ../../third_party/openthread/src/lib/spinel/radio_spinel_impl.hpp:154:13: error: 'static' function 'LogIfFail' declared in header file should be declared 'static inline' [-Werror,-Wunneeded-internal-declaration]
# static void LogIfFail(const char *aText, otError aError)
# ^
# 2 errors generated.
config("unused") {
cflags = [ "-Wno-unneeded-internal-declaration" ]
}
source_set("app") {
sources = [
"src/app.cc",
"src/app.h",
"src/main.cc",
]
public_deps = [
"//sdk/fidl/fuchsia.lowpan.spinel:fuchsia.lowpan.spinel_llcpp",
"//sdk/fidl/fuchsia.sys",
"//sdk/lib/svc",
"//sdk/lib/sys/cpp",
"//sdk/lib/syslog/cpp",
"//src/connectivity/openthread/lib/ot-stack:ot-stack-callback",
"//src/connectivity/openthread/third_party/openthread/platform",
"//zircon/public/lib/fbl",
"//zircon/public/lib/fidl",
"//zircon/system/ulib/async-loop:async-loop-cpp",
"//zircon/system/ulib/async-loop:async-loop-default",
"//zircon/system/ulib/fidl-async:fidl-async-cpp",
]
include_dirs = [
"//third_party/openthread/openthread-tmp/src/core",
"//third_party/openthread/openthread-tmp/src/core/common",
"//third_party/openthread/openthread-tmp/src/core/radio",
"//third_party/openthread/openthread-tmp/include",
"//third_party/openthread/openthread-tmp/src",
"//third_party/openthread/openthread-tmp/src/ncp",
"//third_party/openthread/openthread-tmp/src/lib/spinel",
"//third_party/openthread/openthread-tmp/third_party/mbedtls",
"//third_party/openthread/openthread-tmp/third_party/mbedtls/repo/include",
"//src/connectivity/openthread/third_party/openthread/platform",
]
defines = [
"MBEDTLS_CONFIG_FILE=\"mbedtls-config.h\"",
"OPENTHREAD_FTD=1",
"SPINEL_PLATFORM_HEADER=\"spinel_platform.h\"",
"OPENTHREAD_CONFIG_FILE=<openthread-config-android.h>",
"OPENTHREAD_SPINEL_CONFIG_OPENTHREAD_MESSAGE_ENABLE=1",
"PACKAGE_NAME=\"OPENTHREAD-CORE\"",
"PACKAGE_VERSION=\"1.0.0\"",
]
configs += [ ":unused" ]
# TODO(fxbug.dev/58162): delete the below and fix compiler warnings
configs += [ "//build/config:Wno-conversion" ]
}
executable("bin") {
output_name = "ot-stack"
deps = [ ":app" ]
}
group("ot-stack") {
public_deps = [ ":pkg" ]
deps = [ "config" ]
}
fuchsia_component("component") {
component_name = "ot-stack"
manifest = "meta/ot-stack.cmx"
deps = [ ":bin" ]
}
fuchsia_package("pkg") {
package_name = "ot-stack"
deps = [ ":component" ]
}