blob: bdd1cfd71b0d563f0ce37d0f513d033619e2ff58 [file] [log] [blame]
Jack Hee2eeff42016-12-07 18:25:17 -08001// Bluetooth stack static library for target
2// ========================================================
3cc_library_static {
4 name: "libbt-stack",
5 defaults: ["fluoride_defaults"],
6 local_include_dirs: [
7 "include",
8 "avct",
9 "btm",
10 "avrc",
11 "l2cap",
12 "avdt",
13 "gatt",
14 "gap",
15 "pan",
16 "bnep",
17 "hid",
18 "sdp",
19 "smp",
20 "srvc",
21 ],
Steven Morelandd1658e82017-07-17 10:17:59 -070022 header_libs: [
Jakub Pawlowskie56fabc2017-10-19 00:26:09 -070023 "libbluetooth_headers",
Steven Morelandd1658e82017-07-17 10:17:59 -070024 ],
Jack Hee2eeff42016-12-07 18:25:17 -080025 include_dirs: [
Pavlin Radoslavovd5f49602017-01-03 16:53:18 -080026 "external/aac/libAACenc/include",
Bailey Forrest7e2ab692017-06-16 15:38:03 -070027 "external/aac/libAACdec/include",
Pavlin Radoslavovd5f49602017-01-03 16:53:18 -080028 "external/aac/libSYS/include",
Jack Hee2eeff42016-12-07 18:25:17 -080029 "external/libldac/inc",
fen wangdfc02a92017-03-15 14:52:52 +090030 "external/libldac/abr/inc",
Jack Hee2eeff42016-12-07 18:25:17 -080031 "system/bt",
32 "system/bt/btcore/include",
33 "system/bt/vnd/include",
34 "system/bt/vnd/ble",
35 "system/bt/btif/include",
36 "system/bt/hci/include",
Jakub Pawlowskiecace462017-10-17 16:40:41 -070037 "system/bt/internal_include",
Jack Hee2eeff42016-12-07 18:25:17 -080038 "system/bt/udrv/include",
39 "system/bt/bta/include",
40 "system/bt/bta/sys",
41 "system/bt/utils/include",
42 ],
43 srcs: [
Pavlin Radoslavovd5f49602017-01-03 16:53:18 -080044 "a2dp/a2dp_aac.cc",
Bailey Forrest7e2ab692017-06-16 15:38:03 -070045 "a2dp/a2dp_aac_decoder.cc",
Pavlin Radoslavovd5f49602017-01-03 16:53:18 -080046 "a2dp/a2dp_aac_encoder.cc",
Jack Hee2eeff42016-12-07 18:25:17 -080047 "a2dp/a2dp_api.cc",
48 "a2dp/a2dp_codec_config.cc",
49 "a2dp/a2dp_sbc.cc",
Bailey Forrest7e2ab692017-06-16 15:38:03 -070050 "a2dp/a2dp_sbc_decoder.cc",
Jack Hee2eeff42016-12-07 18:25:17 -080051 "a2dp/a2dp_sbc_encoder.cc",
52 "a2dp/a2dp_sbc_up_sample.cc",
53 "a2dp/a2dp_vendor.cc",
54 "a2dp/a2dp_vendor_aptx.cc",
55 "a2dp/a2dp_vendor_aptx_hd.cc",
56 "a2dp/a2dp_vendor_aptx_encoder.cc",
57 "a2dp/a2dp_vendor_aptx_hd_encoder.cc",
58 "a2dp/a2dp_vendor_ldac.cc",
fen wangdfc02a92017-03-15 14:52:52 +090059 "a2dp/a2dp_vendor_ldac_abr.cc",
Jack Hee2eeff42016-12-07 18:25:17 -080060 "a2dp/a2dp_vendor_ldac_encoder.cc",
61 "avct/avct_api.cc",
62 "avct/avct_bcb_act.cc",
63 "avct/avct_ccb.cc",
64 "avct/avct_l2c.cc",
65 "avct/avct_l2c_br.cc",
66 "avct/avct_lcb.cc",
67 "avct/avct_lcb_act.cc",
68 "avdt/avdt_ad.cc",
69 "avdt/avdt_api.cc",
70 "avdt/avdt_ccb.cc",
71 "avdt/avdt_ccb_act.cc",
72 "avdt/avdt_l2c.cc",
73 "avdt/avdt_msg.cc",
74 "avdt/avdt_scb.cc",
75 "avdt/avdt_scb_act.cc",
76 "avrc/avrc_api.cc",
77 "avrc/avrc_bld_ct.cc",
78 "avrc/avrc_bld_tg.cc",
79 "avrc/avrc_opt.cc",
80 "avrc/avrc_pars_ct.cc",
81 "avrc/avrc_pars_tg.cc",
82 "avrc/avrc_sdp.cc",
83 "avrc/avrc_utils.cc",
84 "bnep/bnep_api.cc",
85 "bnep/bnep_main.cc",
86 "bnep/bnep_utils.cc",
87 "btm/ble_advertiser_hci_interface.cc",
88 "btm/btm_acl.cc",
89 "btm/btm_ble.cc",
90 "btm/btm_ble_addr.cc",
91 "btm/btm_ble_adv_filter.cc",
92 "btm/btm_ble_batchscan.cc",
93 "btm/btm_ble_bgconn.cc",
94 "btm/btm_ble_cont_energy.cc",
95 "btm/btm_ble_gap.cc",
96 "btm/btm_ble_multi_adv.cc",
97 "btm/btm_ble_privacy.cc",
98 "btm/btm_dev.cc",
99 "btm/btm_devctl.cc",
100 "btm/btm_inq.cc",
101 "btm/btm_main.cc",
102 "btm/btm_pm.cc",
103 "btm/btm_sco.cc",
104 "btm/btm_sec.cc",
105 "btu/btu_hcif.cc",
106 "btu/btu_init.cc",
107 "btu/btu_task.cc",
Jack Hee2eeff42016-12-07 18:25:17 -0800108 "gap/gap_ble.cc",
109 "gap/gap_conn.cc",
Jack Hee2eeff42016-12-07 18:25:17 -0800110 "gatt/att_protocol.cc",
111 "gatt/gatt_api.cc",
112 "gatt/gatt_attr.cc",
113 "gatt/gatt_auth.cc",
114 "gatt/gatt_cl.cc",
115 "gatt/gatt_db.cc",
116 "gatt/gatt_main.cc",
117 "gatt/gatt_sr.cc",
118 "gatt/gatt_utils.cc",
119 "hcic/hciblecmds.cc",
120 "hcic/hcicmds.cc",
121 "hid/hidh_api.cc",
122 "hid/hidh_conn.cc",
123 "hid/hidd_api.cc",
124 "hid/hidd_conn.cc",
125 "l2cap/l2c_api.cc",
126 "l2cap/l2c_ble.cc",
127 "l2cap/l2c_csm.cc",
128 "l2cap/l2c_fcr.cc",
129 "l2cap/l2c_link.cc",
130 "l2cap/l2c_main.cc",
Jack Hee2eeff42016-12-07 18:25:17 -0800131 "l2cap/l2c_utils.cc",
132 "l2cap/l2cap_client.cc",
133 "mcap/mca_api.cc",
134 "mcap/mca_cact.cc",
135 "mcap/mca_csm.cc",
136 "mcap/mca_dact.cc",
137 "mcap/mca_dsm.cc",
138 "mcap/mca_l2c.cc",
139 "mcap/mca_main.cc",
140 "pan/pan_api.cc",
141 "pan/pan_main.cc",
142 "pan/pan_utils.cc",
143 "rfcomm/port_api.cc",
144 "rfcomm/port_rfc.cc",
145 "rfcomm/port_utils.cc",
146 "rfcomm/rfc_l2cap_if.cc",
147 "rfcomm/rfc_mx_fsm.cc",
148 "rfcomm/rfc_port_fsm.cc",
149 "rfcomm/rfc_port_if.cc",
150 "rfcomm/rfc_ts_frames.cc",
151 "rfcomm/rfc_utils.cc",
152 "sdp/sdp_api.cc",
153 "sdp/sdp_db.cc",
154 "sdp/sdp_discovery.cc",
155 "sdp/sdp_main.cc",
156 "sdp/sdp_server.cc",
157 "sdp/sdp_utils.cc",
158 "smp/aes.cc",
159 "smp/p_256_curvepara.cc",
160 "smp/p_256_ecc_pp.cc",
161 "smp/p_256_multprecision.cc",
162 "smp/smp_act.cc",
163 "smp/smp_api.cc",
164 "smp/smp_br_main.cc",
165 "smp/smp_cmac.cc",
166 "smp/smp_keys.cc",
167 "smp/smp_l2c.cc",
168 "smp/smp_main.cc",
169 "smp/smp_utils.cc",
170 "srvc/srvc_battery.cc",
171 "srvc/srvc_dis.cc",
172 "srvc/srvc_eng.cc",
173 ],
Pavlin Radoslavovd5f49602017-01-03 16:53:18 -0800174 static_libs: [
175 "libbt-hci",
176 "libFraunhoferAAC",
177 ],
Jack Hee2eeff42016-12-07 18:25:17 -0800178 shared_libs: [
179 "libcutils",
180 "liblog",
181 ],
182 required: [
183 "libldacBT_enc",
fen wangdfc02a92017-03-15 14:52:52 +0900184 "libldacBT_abr",
Jack Hee2eeff42016-12-07 18:25:17 -0800185 ]
186}
187
188// Bluetooth stack unit tests for target
189// ========================================================
190cc_test {
191 name: "net_test_stack",
192 defaults: ["fluoride_defaults"],
193 local_include_dirs: [
194 "include",
195 ],
196 include_dirs: [
197 "system/bt",
Jakub Pawlowskiecace462017-10-17 16:40:41 -0700198 "system/bt/internal_include",
Jack Hee2eeff42016-12-07 18:25:17 -0800199 ],
200 srcs: ["test/stack_a2dp_test.cc"],
201 shared_libs: [
Pavlin Radoslavov4aecb892017-11-02 14:27:09 -0700202 "libhidlbase",
Jack Hee2eeff42016-12-07 18:25:17 -0800203 "liblog",
Pavlin Radoslavov4aecb892017-11-02 14:27:09 -0700204 "libprotobuf-cpp-lite",
Philip Cuadrac02b5d42017-06-09 14:36:06 -0700205 "libcutils",
Pavlin Radoslavov4aecb892017-11-02 14:27:09 -0700206 "libutils",
Jack Hee2eeff42016-12-07 18:25:17 -0800207 ],
208 static_libs: [
Pavlin Radoslavov4aecb892017-11-02 14:27:09 -0700209 "libbt-bta",
Jack Hee2eeff42016-12-07 18:25:17 -0800210 "libbt-stack",
Bailey Forrest7e2ab692017-06-16 15:38:03 -0700211 "libbt-sbc-decoder",
Jack Hee2eeff42016-12-07 18:25:17 -0800212 "libbt-sbc-encoder",
Pavlin Radoslavovd5f49602017-01-03 16:53:18 -0800213 "libFraunhoferAAC",
Pavlin Radoslavov4aecb892017-11-02 14:27:09 -0700214 "libbtdevice",
215 "libbt-hci",
Jack Hee2eeff42016-12-07 18:25:17 -0800216 "libosi",
Pavlin Radoslavov4aecb892017-11-02 14:27:09 -0700217 "libbt-protos",
218 ],
219 whole_static_libs: [
220 "libbluetooth-for-tests",
Jack Hee2eeff42016-12-07 18:25:17 -0800221 ],
222}
223
224// Bluetooth stack smp unit tests for target
225// ========================================================
226cc_test {
227 name: "net_test_stack_smp",
228 defaults: ["fluoride_defaults"],
229 local_include_dirs: [
230 "include",
231 "btm",
232 "l2cap",
233 "smp",
234 ],
235 include_dirs: [
236 "system/bt",
Jakub Pawlowskiecace462017-10-17 16:40:41 -0700237 "system/bt/internal_include",
Jack Hee2eeff42016-12-07 18:25:17 -0800238 "system/bt/btcore/include",
239 "system/bt/hci/include",
240 "system/bt/utils/include",
241 ],
242 srcs: [
243 "smp/smp_keys.cc",
244 "smp/aes.cc",
245 "smp/smp_api.cc",
246 "smp/smp_main.cc",
247 "smp/smp_utils.cc",
248 "test/stack_smp_test.cc",
249 ],
250 shared_libs: [
251 "libcutils",
252 ],
253 static_libs: [
254 "liblog",
255 "libgmock",
256 "libosi",
257 ],
258}
259
260
261// Bluetooth stack multi-advertising unit tests for target
262// ========================================================
263cc_test {
264 name: "net_test_stack_multi_adv",
265 defaults: ["fluoride_defaults"],
266 local_include_dirs: [
267 "include",
268 "btm",
269 ],
270 include_dirs: [
271 "system/bt",
Jakub Pawlowskiecace462017-10-17 16:40:41 -0700272 "system/bt/internal_include",
Jack Hee2eeff42016-12-07 18:25:17 -0800273 "system/bt/btcore/include",
274 "system/bt/hci/include",
Jakub Pawlowskiecace462017-10-17 16:40:41 -0700275 "system/bt/internal_include",
Jack Hee2eeff42016-12-07 18:25:17 -0800276 "system/bt/utils/include",
277 ],
278 srcs: [
279 "btm/btm_ble_multi_adv.cc",
280 "test/ble_advertiser_test.cc",
281 ],
282 shared_libs: [
283 "libcutils",
284 ],
285 static_libs: [
Jakub Pawlowskib707f442017-07-03 15:39:36 -0700286 "libbluetooth-types",
Jack Hee2eeff42016-12-07 18:25:17 -0800287 "liblog",
288 "libgmock",
289 ],
290}
Jakub Pawlowski103b2c42017-04-28 14:59:46 -0700291
292// Bluetooth stack advertise data parsing unit tests for target
293// =============================================================
294cc_test {
295 name: "net_test_stack_ad_parser",
296 defaults: ["fluoride_defaults"],
297 local_include_dirs: [
298 "include",
299 ],
300 srcs: [
301 "test/ad_parser_unittest.cc",
302 ],
303 static_libs: [
Jakub Pawlowskib707f442017-07-03 15:39:36 -0700304 "libbluetooth-types",
Jakub Pawlowski103b2c42017-04-28 14:59:46 -0700305 "liblog",
306 "libgmock",
307 ],
308}
Ajay Panicker2b7e9052017-03-01 10:00:30 -0800309
310// Bluetooth stack message loop tests for target
311// ========================================================
312cc_test {
313 name: "net_test_btu_message_loop",
314 defaults: ["fluoride_defaults"],
315 local_include_dirs: [
316 "include",
317 "btm",
318 ],
319 include_dirs: [
320 "system/bt/",
Jakub Pawlowskiecace462017-10-17 16:40:41 -0700321 "system/bt/internal_include",
Ajay Panicker2b7e9052017-03-01 10:00:30 -0800322 "system/bt/btcore/include",
323 "system/bt/bta/include",
324 ],
325 srcs: [
326 "btu/btu_task.cc",
327 "test/stack_btu_test.cc",
328 ],
329 shared_libs: [
330 "liblog",
331 "libcutils",
332 "libprotobuf-cpp-lite",
333 ],
334 static_libs: [
Jakub Pawlowskib707f442017-07-03 15:39:36 -0700335 "libbluetooth-types",
Ajay Panicker2b7e9052017-03-01 10:00:30 -0800336 "libgmock",
337 "libosi",
338 "libbt-protos",
339 ],
340}