• Home
  • History
  • Annotate
  • 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_defaults {
11    name: "fluoride_bta_defaults",
12    defaults: ["fluoride_defaults"],
13    local_include_dirs: [
14        "include",
15        "sys",
16        "dm",
17        "hd",
18        "hh",
19    ],
20    include_dirs: [
21        "system/bt",
22        "system/bt/bta/include",
23        "system/bt/btcore/include",
24        "system/bt/btif/avrcp",
25        "system/bt/btif/include",
26        "system/bt/hci/include",
27        "system/bt/internal_include",
28        "system/bt/stack/include",
29        "system/bt/stack/btm",
30        "system/bt/udrv/include",
31        "system/bt/vnd/include",
32        "system/bt/utils/include",
33        "system/bt/gd/rust/shim",
34    ],
35    shared_libs: [
36        "libcutils",
37    ],
38    header_libs: ["libbluetooth_headers"],
39    cflags: ["-DBUILDCFG"],
40}
41
42// BTA static library for target
43// ========================================================
44cc_library_static {
45    name: "libbt-bta",
46    defaults: ["fluoride_bta_defaults"],
47    srcs: [
48        "ag/bta_ag_act.cc",
49        "ag/bta_ag_api.cc",
50        "ag/bta_ag_at.cc",
51        "ag/bta_ag_cfg.cc",
52        "ag/bta_ag_cmd.cc",
53        "ag/bta_ag_main.cc",
54        "ag/bta_ag_rfc.cc",
55        "ag/bta_ag_sco.cc",
56        "ag/bta_ag_sdp.cc",
57        "ar/bta_ar.cc",
58        "av/bta_av_aact.cc",
59        "av/bta_av_act.cc",
60        "av/bta_av_api.cc",
61        "av/bta_av_cfg.cc",
62        "av/bta_av_ci.cc",
63        "av/bta_av_main.cc",
64        "av/bta_av_ssm.cc",
65        "dm/bta_dm_act.cc",
66        "dm/bta_dm_api.cc",
67        "dm/bta_dm_cfg.cc",
68        "dm/bta_dm_ci.cc",
69        "dm/bta_dm_main.cc",
70        "dm/bta_dm_pm.cc",
71        "gatt/bta_gattc_act.cc",
72        "gatt/bta_gattc_api.cc",
73        "gatt/bta_gattc_cache.cc",
74        "gatt/bta_gattc_main.cc",
75        "gatt/bta_gattc_queue.cc",
76        "gatt/bta_gattc_utils.cc",
77        "gatt/bta_gatts_act.cc",
78        "gatt/bta_gatts_api.cc",
79        "gatt/bta_gatts_main.cc",
80        "gatt/bta_gatts_utils.cc",
81        "gatt/database.cc",
82        "gatt/database_builder.cc",
83        "vc/device.cc",
84        "vc/vc.cc",
85        "hearing_aid/hearing_aid.cc",
86        "hearing_aid/hearing_aid_audio_source.cc",
87        "hf_client/bta_hf_client_act.cc",
88        "hf_client/bta_hf_client_api.cc",
89        "hf_client/bta_hf_client_at.cc",
90        "hf_client/bta_hf_client_main.cc",
91        "hf_client/bta_hf_client_rfc.cc",
92        "hf_client/bta_hf_client_sco.cc",
93        "hf_client/bta_hf_client_sdp.cc",
94        "hh/bta_hh_act.cc",
95        "hh/bta_hh_api.cc",
96        "hh/bta_hh_cfg.cc",
97        "hh/bta_hh_le.cc",
98        "hh/bta_hh_main.cc",
99        "hh/bta_hh_utils.cc",
100        "hd/bta_hd_act.cc",
101        "hd/bta_hd_api.cc",
102        "hd/bta_hd_main.cc",
103        "jv/bta_jv_act.cc",
104        "jv/bta_jv_api.cc",
105        "jv/bta_jv_cfg.cc",
106        "pan/bta_pan_act.cc",
107        "pan/bta_pan_api.cc",
108        "pan/bta_pan_ci.cc",
109        "pan/bta_pan_main.cc",
110        "sdp/bta_sdp.cc",
111        "sdp/bta_sdp_act.cc",
112        "sdp/bta_sdp_api.cc",
113        "sdp/bta_sdp_cfg.cc",
114        "sys/bta_sys_conn.cc",
115        "sys/bta_sys_main.cc",
116        "sys/utl.cc",
117    ],
118    static_libs: [
119        "avrcp-target-service",
120        "lib-bt-packets",
121    ],
122    host_supported: true,
123}
124
125// bta unit tests for target
126// ========================================================
127cc_test {
128    name: "net_test_bta",
129    defaults: ["fluoride_bta_defaults"],
130    test_suites: ["device-tests"],
131    srcs: [
132        "test/bta_hf_client_test.cc",
133        "test/bta_dm_cust_uuid_test.cc",
134        "test/bta_dip_test.cc",
135        "test/gatt/database_builder_test.cc",
136        "test/gatt/database_builder_sample_device_test.cc",
137        "test/gatt/database_test.cc",
138    ],
139    shared_libs: [
140        "libcrypto",
141        "liblog",
142        "libprotobuf-cpp-lite",
143    ],
144    static_libs: [
145        "crypto_toolbox_for_tests",
146        "libbtcore",
147        "libbt-bta",
148        "libbt-audio-hal-interface",
149        "libbluetooth-types",
150        "libbt-protos-lite",
151        "libosi",
152        "libbt-common",
153    ],
154}
155
156cc_test {
157    name: "bt_host_test_bta",
158    defaults: ["fluoride_bta_defaults"],
159    test_suites: ["device-tests"],
160    host_supported: true,
161    include_dirs: [
162        "system/bt",
163        "system/bt/gd",
164    ],
165    generated_headers: [
166        "BluetoothGeneratedBundlerSchema_h_bfbs",
167        "BluetoothGeneratedDumpsysDataSchema_h",
168        "BluetoothGeneratedPackets_h",
169    ],
170    srcs: [
171        ":TestMockBtif",
172        ":TestMockDevice",
173        ":TestMockMainShim",
174        ":TestMockStack",
175        ":TestStubOsi",
176        "dm/bta_dm_act.cc",
177        "dm/bta_dm_cfg.cc",
178        "dm/bta_dm_ci.cc",
179        "dm/bta_dm_main.cc",
180        "dm/bta_dm_pm.cc",
181        "gatt/bta_gattc_act.cc",
182        "gatt/bta_gattc_api.cc",
183        "gatt/bta_gattc_cache.cc",
184        "gatt/bta_gattc_main.cc",
185        "gatt/bta_gattc_queue.cc",
186        "gatt/bta_gattc_utils.cc",
187        "gatt/database.cc",
188        "gatt/database_builder.cc",
189        "hh/bta_hh_act.cc",
190        "hh/bta_hh_cfg.cc",
191        "hh/bta_hh_le.cc",
192        "hh/bta_hh_main.cc",
193        "hh/bta_hh_utils.cc",
194        "sys/bta_sys_conn.cc",
195        "sys/bta_sys_main.cc",
196        "test/bta_dm_test.cc",
197        "test/bta_gatt_test.cc",
198    ],
199    shared_libs: [
200        "libcrypto",
201        "libflatbuffers-cpp",
202        "liblog",
203        "libprotobuf-cpp-lite",
204    ],
205    static_libs: [
206        "libbluetooth-types",
207        "libbt-common",
208        "libbt-protos-lite",
209        "libbtcore",
210        "libgmock",
211    ],
212}
213
214// bta hf client add record tests for target
215// ========================================================
216cc_test {
217    name: "net_test_hf_client_add_record",
218    defaults: ["fluoride_defaults"],
219    test_suites: ["device-tests"],
220    include_dirs: [
221        "system/bt",
222        "system/bt/bta/include",
223        "system/bt/bta/sys",
224        "system/bt/btif/include",
225        "system/bt/internal_include",
226        "system/bt/stack/include",
227        "system/bt/utils/include",
228    ],
229    srcs: [
230        "test/bta_hf_client_add_record_test.cc",
231    ],
232    header_libs: ["libbluetooth_headers"],
233    shared_libs: [
234        "libcutils",
235        "liblog",
236    ],
237    static_libs: [
238        "libbluetooth-types",
239        "libosi",
240    ],
241    cflags: ["-DBUILDCFG"],
242}
243
244
245// bta unit tests for host
246// ========================================================
247cc_test {
248    name: "bluetooth_vc_test",
249    test_suites: ["device-tests"],
250    defaults: [
251        "fluoride_bta_defaults",
252        "clang_coverage_bin",
253    ],
254    host_supported: true,
255    include_dirs: [
256        "system/bt",
257        "system/bt/bta/include",
258        "system/bt/bta/test/common",
259        "system/bt/stack/include",
260    ],
261    srcs : [
262        "gatt/database.cc",
263        "gatt/database_builder.cc",
264        "test/common/bta_gatt_api_mock.cc",
265        "test/common/bta_gatt_queue_mock.cc",
266        "test/common/btm_api_mock.cc",
267        "vc/devices_test.cc",
268        "vc/device.cc",
269        "vc/vc.cc",
270        "vc/vc_test.cc",
271    ],
272    shared_libs: [
273        "libprotobuf-cpp-lite",
274        "libcrypto",
275    ],
276    static_libs : [
277        "crypto_toolbox_for_tests",
278        "libgmock",
279        "libbt-common",
280        "libbt-protos-lite",
281    ],
282    sanitize: {
283        cfi: false,
284    },
285}
286