blob: dcd23cd087741071adef964e222dfacf6bbefd7a [file] [log] [blame]
#
# Copyright 2021 Google, Inc.
#
# 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("//bt/system/gd/dumpsys/bundler/bundler.gni")
import("//bt/system/gd/packet/parser/packetgen.gni")
import("//common-mk/flatbuffer.gni")
config("gd_defaults") {
cflags_cc = [
"-DGOOGLE_PROTOBUF_NO_RTTI",
"-Wno-unused-parameter",
"-Wno-unused-result",
"-Wno-tautological-overlap-compare",
]
defines = [
"OS_LINUX_GENERIC",
"OS_GENERIC",
"TARGET_FLOSS",
]
libs = [
"ssl",
"crypto",
]
include_dirs = [ "//bt/system/gd" ]
configs = [ "//bt/system:target_defaults" ]
}
config("rust_defaults") {
# Empty for now
}
group("gd_default_deps") {
deps = [
"//bt/system:libbt-platform-protos-lite",
"//bt/system/gd:BluetoothGeneratedDumpsysDataSchema_h",
"//bt/system/gd:BluetoothGeneratedPackets_h",
"//bt/system/gd/dumpsys:libbluetooth-dumpsys",
"//bt/system/gd/rust/shim:init_flags_bridge_header",
]
}
static_library("libbluetooth_gd") {
sources = [
"module.cc",
"stack_manager.cc",
]
include_dirs = [ "." ]
configs += [ ":gd_defaults" ]
deps = [
"//bt/system/gd/rust/topshim:libbluetooth_topshim",
"//bt/system/gd/rust/shim:libbluetooth_rust_interop",
"//bt/system/gd:BluetoothGeneratedPackets_h",
"//bt/system/gd/att:BluetoothAttSources",
"//bt/system/gd/common:BluetoothCommonSources",
"//bt/system/gd/crypto_toolbox:BluetoothCryptoToolboxSources",
"//bt/system/gd/dumpsys:BluetoothDumpsysSources",
"//bt/system/gd/btaa:BluetoothBtaaSources_linux",
"//bt/system/gd/hal:BluetoothHalSources",
"//bt/system/gd/hal:BluetoothHalSources_hci_host",
"//bt/system/gd/l2cap:BluetoothL2capSources",
"//bt/system/gd/metrics:BluetoothMetricsSources",
"//bt/system/gd/neighbor:BluetoothNeighborSources",
"//bt/system/gd/security:BluetoothSecuritySources",
"//bt/system/gd/shim:BluetoothShimSources",
"//bt/system/gd/storage:BluetoothStorageSources",
]
}
flatbuffer("BluetoothGeneratedDumpsysDataSchema_h") {
sources = [
"btaa/activity_attribution.fbs",
"common/init_flags.fbs",
"dumpsys_data.fbs",
"hci/hci_acl_manager.fbs",
"hci/hci_controller.fbs",
"l2cap/classic/l2cap_classic_module.fbs",
"os/wakelock_manager.fbs",
"shim/dumpsys.fbs",
]
}
bt_flatc_binary_schema("BluetoothGeneratedDumpsysBinarySchema_bfbs") {
sources = [
"btaa/activity_attribution.fbs",
"common/init_flags.fbs",
"dumpsys_data.fbs",
"hci/hci_acl_manager.fbs",
"hci/hci_controller.fbs",
"l2cap/classic/l2cap_classic_module.fbs",
"os/wakelock_manager.fbs",
"shim/dumpsys.fbs",
]
include_dir = "system/gd"
}
packetgen_py("BluetoothGeneratedPackets_python3_cc") {
sources = [
"hci/hci_packets.pdl",
"l2cap/l2cap_packets.pdl",
"security/smp_packets.pdl",
]
include = "system/gd"
source_root = "../.."
shards = 10
}
packetgen_headers("BluetoothGeneratedPackets_h") {
sources = [
"hci/hci_packets.pdl",
"l2cap/l2cap_packets.pdl",
"security/smp_packets.pdl",
]
include = "system/gd"
source_root = "../.."
}
packetgen_rust("BluetoothGeneratedPackets_rust") {
sources = [ "hci/hci_packets.pdl" ]
include = "system/gd"
source_root = "../.."
}