• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1package {
2    // See: http://go/android-license-faq
3    // A large-scale-change added 'default_applicable_licenses' to import
4    // all of the 'license_kinds' from "system_bt_license"
5    // to get the below license kinds:
6    //   SPDX-license-identifier-Apache-2.0
7    default_applicable_licenses: ["system_bt_license"],
8}
9
10// HCI static library for target
11cc_library_static {
12    name: "libbt-hci",
13    defaults: ["fluoride_basic_defaults"],
14    srcs: [
15        "src/btsnoop.cc",
16        "src/btsnoop_mem.cc",
17        "src/btsnoop_net.cc",
18        "src/buffer_allocator.cc",
19        "src/hci_inject.cc",
20        "src/hci_packet_factory.cc",
21        "src/hci_packet_parser.cc",
22        "src/packet_fragmenter.cc",
23    ],
24    target: {
25        android: {
26            srcs: ["src/hci_layer_android.cc"],
27        },
28        host: {
29            srcs: ["src/hci_layer_linux.cc"],
30        },
31    },
32    local_include_dirs: [
33        "include",
34    ],
35    include_dirs: [
36        "packages/modules/Bluetooth/system",
37        "packages/modules/Bluetooth/system/gd",
38        "packages/modules/Bluetooth/system/internal_include",
39        "packages/modules/Bluetooth/system/stack/include",
40        "packages/modules/Bluetooth/system/utils/include",
41        "packages/modules/Bluetooth/system/bta/include",
42        "packages/modules/Bluetooth/system/btif/include",
43        "system/libhwbinder/include",
44        "packages/modules/Bluetooth/system/gd/rust/shim",
45    ],
46    product_variables: {
47        debuggable: {
48            cflags: [
49                "-DBT_NET_DEBUG=true",
50            ],
51        },
52    },
53    host_supported: true,
54    min_sdk_version: "Tiramisu"
55}
56
57// HCI unit tests for target
58cc_test {
59    name: "net_test_hci",
60    test_suites: ["device-tests"],
61    defaults: [
62        "fluoride_basic_defaults",
63        "fluoride_test_defaults",
64        "mts_defaults",
65    ],
66    host_supported: false,
67    local_include_dirs: [
68        "include",
69    ],
70    include_dirs: [
71        "packages/modules/Bluetooth/system",
72        "packages/modules/Bluetooth/system/internal_include",
73        "packages/modules/Bluetooth/system/osi/test",
74        "packages/modules/Bluetooth/system/stack/include",
75        "packages/modules/Bluetooth/system/utils/include",
76        "system/libhwbinder/include",
77        "packages/modules/Bluetooth/system/gd/rust/shim",
78    ],
79    srcs: [
80        "test/packet_fragmenter_test.cc",
81    ],
82    shared_libs: [
83        "android.hardware.bluetooth.audio@2.0",
84        "android.hardware.bluetooth.audio@2.1",
85        "libdl",
86    ],
87    static_libs: [
88        "libbluetooth-for-tests",
89        "libbtcore",
90        "libbt-hci",
91    ],
92}
93
94cc_test {
95    name: "net_test_hci_fragmenter_native",
96    test_suites: ["device-tests"],
97    defaults: [
98        "fluoride_unit_test_defaults",
99        "mts_defaults",
100    ],
101    local_include_dirs: [
102        "include",
103    ],
104    include_dirs: [
105        "packages/modules/Bluetooth/system",
106        "packages/modules/Bluetooth/system/gd",
107        "packages/modules/Bluetooth/system/stack/include",
108        "packages/modules/Bluetooth/system/osi/test",
109    ],
110    srcs: [
111        "src/buffer_allocator.cc",
112        "test/packet_fragmenter_host_test.cc",
113    ],
114}
115
116