142 lines
5.0 KiB
Plaintext
142 lines
5.0 KiB
Plaintext
//
|
|
// Copyright (c) 2021, The OpenThread Authors.
|
|
// All rights reserved.
|
|
//
|
|
// Redistribution and use in source and binary forms, with or without
|
|
// modification, are permitted provided that the following conditions are met:
|
|
// 1. Redistributions of source code must retain the above copyright
|
|
// notice, this list of conditions and the following disclaimer.
|
|
// 2. Redistributions in binary form must reproduce the above copyright
|
|
// notice, this list of conditions and the following disclaimer in the
|
|
// documentation and/or other materials provided with the distribution.
|
|
// 3. Neither the name of the copyright holder nor the
|
|
// names of its contributors may be used to endorse or promote products
|
|
// derived from this software without specific prior written permission.
|
|
//
|
|
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
|
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
// POSSIBILITY OF SUCH DAMAGE.
|
|
//
|
|
|
|
package {
|
|
default_applicable_licenses: ["external_ot-br-posix_license"],
|
|
}
|
|
|
|
// Added automatically by a large-scale-change that took the approach of
|
|
// 'apply every license found to every target'. While this makes sure we respect
|
|
// every license restriction, it may not be entirely correct.
|
|
//
|
|
// e.g. GPL in an MIT project might only apply to the contrib/ directory.
|
|
//
|
|
// Please consider splitting the single license below into multiple licenses,
|
|
// taking care not to lose any license_kind information, and overriding the
|
|
// default license using the 'licenses: [...]' property on targets as needed.
|
|
//
|
|
// For unused files, consider creating a 'fileGroup' with "//visibility:private"
|
|
// to attach the license to, and including a comment whether the files may be
|
|
// used in the current project.
|
|
//
|
|
// large-scale-change included anything that looked like it might be a license
|
|
// text as a license_text. e.g. LICENSE, NOTICE, COPYING etc.
|
|
//
|
|
// Please consider removing redundant or irrelevant files from 'license_text:'.
|
|
// See: http://go/android-license-faq
|
|
license {
|
|
name: "external_ot-br-posix_license",
|
|
visibility: [":__subpackages__"],
|
|
license_kinds: [
|
|
"SPDX-license-identifier-Apache-2.0",
|
|
"SPDX-license-identifier-BSD",
|
|
"SPDX-license-identifier-MIT",
|
|
],
|
|
license_text: [
|
|
"LICENSE",
|
|
"NOTICE",
|
|
],
|
|
}
|
|
|
|
genrule {
|
|
name: "otbr_version_header",
|
|
cmd: "$(location src/android/config-android-version-gen.sh) < $(in) > $(out)",
|
|
srcs: ["src/android/otbr-config-android-version.h.in"],
|
|
out: ["otbr-config-android-version.h"],
|
|
tool_files: [
|
|
"src/android/config-android-version-gen.sh",
|
|
],
|
|
}
|
|
|
|
cc_binary {
|
|
name: "otbr-agent",
|
|
generated_headers: ["otbr_version_header"],
|
|
|
|
include_dirs: [
|
|
"external/mdnsresponder/mDNSShared",
|
|
"external/openthread/include",
|
|
"external/openthread/src",
|
|
"external/openthread/src/posix/platform/include",
|
|
],
|
|
|
|
local_include_dirs: [
|
|
"include",
|
|
"src",
|
|
],
|
|
|
|
cflags: [
|
|
"-Wall",
|
|
"-Wextra",
|
|
"-DOTBR_CONFIG_ANDROID_PROPERTY_ENABLE=1",
|
|
"-DOTBR_CONFIG_ANDROID_VERSION_HEADER_ENABLE=1",
|
|
"-DOTBR_CONFIG_FILE=\"src/android/otbr-config-android.h\"",
|
|
"-DOTBR_ENABLE_MDNS_MDNSSD=1",
|
|
"-DOTBR_ENABLE_SRP_ADVERTISING_PROXY=1",
|
|
"-DOTBR_ENABLE_DNSSD_DISCOVERY_PROXY=1",
|
|
"-DOTBR_PACKAGE_NAME=\"OTBR_AGENT\"",
|
|
],
|
|
|
|
srcs: [
|
|
"src/agent/application.cpp",
|
|
"src/agent/main.cpp",
|
|
"src/border_agent/border_agent.cpp",
|
|
"src/ncp/ncp_openthread.cpp",
|
|
"src/sdp_proxy/advertising_proxy.cpp",
|
|
"src/sdp_proxy/discovery_proxy.cpp",
|
|
"src/utils/thread_helper.cpp",
|
|
"src/common/dns_utils.cpp",
|
|
"src/common/logging.cpp",
|
|
"src/common/task_runner.cpp",
|
|
"src/common/types.cpp",
|
|
"src/common/mainloop.cpp",
|
|
"src/common/mainloop_manager.cpp",
|
|
"src/mdns/mdns.cpp",
|
|
"src/mdns/mdns_mdnssd.cpp",
|
|
"src/utils/dns_utils.cpp",
|
|
"src/utils/hex.cpp",
|
|
"src/utils/infra_link_selector.cpp",
|
|
"src/utils/socket_utils.cpp",
|
|
"src/utils/string_utils.cpp",
|
|
],
|
|
|
|
shared_libs: [
|
|
"libbase",
|
|
"libutils",
|
|
"libcutils",
|
|
"libmdnssd",
|
|
],
|
|
|
|
static_libs: [
|
|
"libopenthread-cli",
|
|
"ot-core",
|
|
"openthread-tcplp",
|
|
],
|
|
|
|
host_ldlibs: ["-lutil"],
|
|
}
|