• 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
10cc_library_static {
11    name: "libbt-common",
12    defaults: [
13        "fluoride_defaults",
14    ],
15    host_supported: true,
16    include_dirs: [
17        "packages/modules/Bluetooth/system",
18        "packages/modules/Bluetooth/system/gd",
19        "packages/modules/Bluetooth/system/stack/include",
20    ],
21    srcs: [
22        "address_obfuscator.cc",
23        "le_conn_params.cc",
24        "message_loop_thread.cc",
25        "os_utils.cc",
26        "repeating_timer.cc",
27        "stop_watch_legacy.cc",
28        "time_util.cc",
29    ],
30    proto: {
31        type: "lite",
32        canonical_path_from_root: false,
33        export_proto_headers: true,
34    },
35    shared_libs: [
36        "libcrypto",
37        "libcutils",
38    ],
39    apex_available: ["com.android.bt"],
40    min_sdk_version: "Tiramisu",
41    header_libs: ["libbluetooth_headers"],
42    static_libs: [
43        "libbluetooth_crypto_toolbox",
44        "libbluetooth_hci_pdl",
45        "libbluetooth_log",
46        "libbt-platform-protos-lite",
47    ],
48}
49
50cc_test {
51    name: "bluetooth_test_common",
52    test_suites: ["general-tests"],
53    defaults: [
54        "fluoride_defaults",
55        "mts_defaults",
56    ],
57    host_supported: true,
58    test_options: {
59        unit_test: true,
60    },
61    include_dirs: [
62        "packages/modules/Bluetooth/system",
63        "packages/modules/Bluetooth/system/gd",
64        "packages/modules/Bluetooth/system/stack/include",
65    ],
66    srcs: [
67        "address_obfuscator_unittest.cc",
68        "base_bind_unittest.cc",
69        "leaky_bonded_queue_unittest.cc",
70        "message_loop_thread_unittest.cc",
71        "repeating_timer_unittest.cc",
72        "state_machine_unittest.cc",
73        "time_util_unittest.cc",
74    ],
75    target: {
76        android: {
77            shared_libs: ["libstatssocket"],
78        },
79    },
80    shared_libs: [
81        "libbase",
82        "libcrypto",
83        "liblog",
84    ],
85    static_libs: [
86        "libbluetooth-types",
87        "libbluetooth_crypto_toolbox",
88        "libbluetooth_hci_pdl",
89        "libbluetooth_log",
90        "libbt-common",
91        "libbt-platform-protos-lite",
92        "libchrome",
93        "libevent",
94        "libgmock",
95        "libprotobuf-cpp-lite",
96    ],
97    sanitize: {
98        cfi: false,
99    },
100    header_libs: ["libbluetooth_headers"],
101}
102
103cc_test {
104    name: "net_test_performance",
105    defaults: [
106        "fluoride_defaults",
107        "mts_defaults",
108    ],
109    test_suites: ["general-tests"],
110    include_dirs: [
111        "packages/modules/Bluetooth/system",
112        "packages/modules/Bluetooth/system/gd",
113    ],
114    host_supported: true,
115    srcs: [
116        "test/thread_performance_test.cc",
117    ],
118    shared_libs: [
119        "libbase",
120        "liblog",
121    ],
122    static_libs: [
123        "libbluetooth_log",
124        "libbt-common",
125        "libchrome",
126        "libcom.android.sysprop.bluetooth.wrapped",
127        "libevent",
128        "libgmock",
129        "libosi",
130    ],
131    header_libs: ["libbluetooth_headers"],
132}
133
134cc_benchmark {
135    name: "bluetooth_benchmark_thread_performance",
136    defaults: [
137        "fluoride_defaults",
138    ],
139    host_supported: true,
140    include_dirs: [
141        "packages/modules/Bluetooth/system",
142        "packages/modules/Bluetooth/system/gd",
143    ],
144    srcs: [
145        "benchmark/thread_performance_benchmark.cc",
146    ],
147    shared_libs: [
148        "libbase",
149        "liblog",
150    ],
151    static_libs: [
152        "libbluetooth_log",
153        "libbt-common",
154        "libchrome",
155        "libcom.android.sysprop.bluetooth.wrapped",
156        "libevent",
157        "libosi",
158    ],
159    header_libs: ["libbluetooth_headers"],
160}
161