# # 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/gd/dumpsys/bundler/bundler.gni") import("//bt/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", ] libs = [ "ssl", "crypto", ] include_dirs = [ "//bt/gd" ] configs = [ "//bt:target_defaults" ] } config("rust_defaults") { # Empty for now } group("gd_default_deps") { deps = [ "//bt/gd:BluetoothGeneratedDumpsysDataSchema_h", "//bt/gd:BluetoothGeneratedPackets_h", "//bt/gd/dumpsys:BluetoothGeneratedDumpsysBundledSchema_h", "//bt/gd/rust/shim:init_flags_bridge_header", ] } static_library("libbluetooth_gd") { sources = [ "module.cc", "stack_manager.cc", ] include_dirs = [ "." ] configs += [ ":gd_defaults" ] deps = [ "//bt/gd/rust/topshim:libbluetooth_topshim", "//bt/gd/rust/shim:libbluetooth_rust_interop", "//bt/gd:BluetoothGeneratedPackets_h", "//bt/gd/att:BluetoothAttSources", "//bt/gd/common:BluetoothCommonSources", "//bt/gd/crypto_toolbox:BluetoothCryptoToolboxSources", "//bt/gd/dumpsys:BluetoothDumpsysSources", "//bt/gd/btaa:BluetoothBtaaSources_linux", "//bt/gd/hal:BluetoothHalSources", "//bt/gd/hal:BluetoothHalSources_hci_host", "//bt/gd/l2cap:BluetoothL2capSources", "//bt/gd/neighbor:BluetoothNeighborSources", "//bt/gd/security:BluetoothSecuritySources", "//bt/gd/shim:BluetoothShimSources", "//bt/gd/storage:BluetoothStorageSources", ] } flatbuffer("BluetoothGeneratedDumpsysDataSchema_h") { sources = [ "btaa/activity_attribution.fbs", "common/init_flags.fbs", "dumpsys_data.fbs", "hci/hci_acl_manager.fbs", "l2cap/classic/l2cap_classic_module.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", "l2cap/classic/l2cap_classic_module.fbs", "shim/dumpsys.fbs", ] include_dir = "bt/gd" } packetgen_py("BluetoothGeneratedPackets_python3_cc") { sources = [ "hci/hci_packets.pdl", "l2cap/l2cap_packets.pdl", "security/smp_packets.pdl", ] include = "bt/gd" source_root = "../.." shards = 10 } packetgen_headers("BluetoothGeneratedPackets_h") { sources = [ "hci/hci_packets.pdl", "l2cap/l2cap_packets.pdl", "security/smp_packets.pdl", ] include = "bt/gd" source_root = "../.." } packetgen_rust("BluetoothGeneratedPackets_rust") { sources = [ "hci/hci_packets.pdl" ] include = "bt/gd" source_root = "../.." }