Android.bp 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448
  1. crypto_toolbox_srcs = [
  2. "crypto_toolbox/aes.cc",
  3. "crypto_toolbox/aes_cmac.cc",
  4. "crypto_toolbox/crypto_toolbox.cc",
  5. ]
  6. // Bluetooth stack static library for target
  7. // ========================================================
  8. cc_library_static {
  9. name: "libbt-stack",
  10. defaults: ["fluoride_defaults"],
  11. local_include_dirs: [
  12. "include",
  13. "avct",
  14. "btm",
  15. "avrc",
  16. "l2cap",
  17. "avdt",
  18. "gatt",
  19. "gap",
  20. "pan",
  21. "bnep",
  22. "hid",
  23. "sdp",
  24. "smp",
  25. "srvc",
  26. ],
  27. header_libs: [
  28. "libbluetooth_headers",
  29. ],
  30. include_dirs: [
  31. "external/aac/libAACenc/include",
  32. "external/aac/libAACdec/include",
  33. "external/aac/libSYS/include",
  34. "external/libldac/inc",
  35. "external/libldac/abr/inc",
  36. "system/bt",
  37. "system/bt/btcore/include",
  38. "system/bt/vnd/include",
  39. "system/bt/vnd/ble",
  40. "system/bt/btif/include",
  41. "system/bt/hci/include",
  42. "system/bt/internal_include",
  43. "system/bt/udrv/include",
  44. "system/bt/bta/include",
  45. "system/bt/bta/sys",
  46. "system/bt/utils/include",
  47. ],
  48. cflags: ["-Wno-implicit-fallthrough"],
  49. srcs: crypto_toolbox_srcs + [
  50. "a2dp/a2dp_aac.cc",
  51. "a2dp/a2dp_aac_decoder.cc",
  52. "a2dp/a2dp_aac_encoder.cc",
  53. "a2dp/a2dp_api.cc",
  54. "a2dp/a2dp_codec_config.cc",
  55. "a2dp/a2dp_sbc.cc",
  56. "a2dp/a2dp_sbc_decoder.cc",
  57. "a2dp/a2dp_sbc_encoder.cc",
  58. "a2dp/a2dp_sbc_up_sample.cc",
  59. "a2dp/a2dp_vendor.cc",
  60. "a2dp/a2dp_vendor_aptx.cc",
  61. "a2dp/a2dp_vendor_aptx_hd.cc",
  62. "a2dp/a2dp_vendor_aptx_encoder.cc",
  63. "a2dp/a2dp_vendor_aptx_hd_encoder.cc",
  64. "a2dp/a2dp_vendor_ldac.cc",
  65. "a2dp/a2dp_vendor_ldac_abr.cc",
  66. "a2dp/a2dp_vendor_ldac_decoder.cc",
  67. "a2dp/a2dp_vendor_ldac_encoder.cc",
  68. "avct/avct_api.cc",
  69. "avct/avct_bcb_act.cc",
  70. "avct/avct_ccb.cc",
  71. "avct/avct_l2c.cc",
  72. "avct/avct_l2c_br.cc",
  73. "avct/avct_lcb.cc",
  74. "avct/avct_lcb_act.cc",
  75. "avdt/avdt_ad.cc",
  76. "avdt/avdt_api.cc",
  77. "avdt/avdt_ccb.cc",
  78. "avdt/avdt_ccb_act.cc",
  79. "avdt/avdt_l2c.cc",
  80. "avdt/avdt_msg.cc",
  81. "avdt/avdt_scb.cc",
  82. "avdt/avdt_scb_act.cc",
  83. "avrc/avrc_api.cc",
  84. "avrc/avrc_bld_ct.cc",
  85. "avrc/avrc_bld_tg.cc",
  86. "avrc/avrc_opt.cc",
  87. "avrc/avrc_pars_ct.cc",
  88. "avrc/avrc_pars_tg.cc",
  89. "avrc/avrc_sdp.cc",
  90. "avrc/avrc_utils.cc",
  91. "bnep/bnep_api.cc",
  92. "bnep/bnep_main.cc",
  93. "bnep/bnep_utils.cc",
  94. "btm/ble_advertiser_hci_interface.cc",
  95. "btm/btm_acl.cc",
  96. "btm/btm_ble.cc",
  97. "btm/btm_ble_addr.cc",
  98. "btm/btm_ble_adv_filter.cc",
  99. "btm/btm_ble_batchscan.cc",
  100. "btm/btm_ble_bgconn.cc",
  101. "btm/btm_ble_connection_establishment.cc",
  102. "btm/btm_ble_cont_energy.cc",
  103. "btm/btm_ble_gap.cc",
  104. "btm/btm_ble_multi_adv.cc",
  105. "btm/btm_ble_privacy.cc",
  106. "btm/btm_dev.cc",
  107. "btm/btm_devctl.cc",
  108. "btm/btm_inq.cc",
  109. "btm/btm_main.cc",
  110. "btm/btm_pm.cc",
  111. "btm/btm_sco.cc",
  112. "btm/btm_sec.cc",
  113. "btu/btu_hcif.cc",
  114. "btu/btu_init.cc",
  115. "btu/btu_task.cc",
  116. "gap/gap_ble.cc",
  117. "gap/gap_conn.cc",
  118. "gatt/att_protocol.cc",
  119. "gatt/connection_manager.cc",
  120. "gatt/gatt_api.cc",
  121. "gatt/gatt_attr.cc",
  122. "gatt/gatt_auth.cc",
  123. "gatt/gatt_cl.cc",
  124. "gatt/gatt_db.cc",
  125. "gatt/gatt_main.cc",
  126. "gatt/gatt_sr.cc",
  127. "gatt/gatt_utils.cc",
  128. "hcic/hciblecmds.cc",
  129. "hcic/hcicmds.cc",
  130. "hid/hidh_api.cc",
  131. "hid/hidh_conn.cc",
  132. "hid/hidd_api.cc",
  133. "hid/hidd_conn.cc",
  134. "l2cap/l2c_api.cc",
  135. "l2cap/l2c_ble.cc",
  136. "l2cap/l2c_csm.cc",
  137. "l2cap/l2c_fcr.cc",
  138. "l2cap/l2c_link.cc",
  139. "l2cap/l2c_main.cc",
  140. "l2cap/l2c_utils.cc",
  141. "l2cap/l2cap_client.cc",
  142. "pan/pan_api.cc",
  143. "pan/pan_main.cc",
  144. "pan/pan_utils.cc",
  145. "rfcomm/port_api.cc",
  146. "rfcomm/port_rfc.cc",
  147. "rfcomm/port_utils.cc",
  148. "rfcomm/rfc_l2cap_if.cc",
  149. "rfcomm/rfc_mx_fsm.cc",
  150. "rfcomm/rfc_port_fsm.cc",
  151. "rfcomm/rfc_port_if.cc",
  152. "rfcomm/rfc_ts_frames.cc",
  153. "rfcomm/rfc_utils.cc",
  154. "sdp/sdp_api.cc",
  155. "sdp/sdp_db.cc",
  156. "sdp/sdp_discovery.cc",
  157. "sdp/sdp_main.cc",
  158. "sdp/sdp_server.cc",
  159. "sdp/sdp_utils.cc",
  160. "smp/p_256_curvepara.cc",
  161. "smp/p_256_ecc_pp.cc",
  162. "smp/p_256_multprecision.cc",
  163. "smp/smp_act.cc",
  164. "smp/smp_api.cc",
  165. "smp/smp_br_main.cc",
  166. "smp/smp_keys.cc",
  167. "smp/smp_l2c.cc",
  168. "smp/smp_main.cc",
  169. "smp/smp_utils.cc",
  170. "srvc/srvc_dis.cc",
  171. "srvc/srvc_eng.cc",
  172. ],
  173. static_libs: [
  174. "libbt-hci",
  175. "libFraunhoferAAC",
  176. ],
  177. shared_libs: [
  178. "libcutils",
  179. "liblog",
  180. ],
  181. required: [
  182. "libldacBT_enc",
  183. "libldacBT_abr",
  184. ],
  185. }
  186. // Bluetooth stack unit tests for target
  187. // ========================================================
  188. cc_test {
  189. name: "net_test_stack",
  190. defaults: ["fluoride_defaults"],
  191. test_suites: ["device-tests"],
  192. local_include_dirs: [
  193. "include",
  194. ],
  195. include_dirs: [
  196. "system/bt",
  197. "system/bt/internal_include",
  198. ],
  199. srcs: [
  200. "test/stack_a2dp_test.cc",
  201. ],
  202. shared_libs: [
  203. "libcrypto",
  204. "libhidlbase",
  205. "liblog",
  206. "libprotobuf-cpp-lite",
  207. "libcutils",
  208. "libutils",
  209. ],
  210. static_libs: [
  211. "libbt-bta",
  212. "libbt-stack",
  213. "libbt-common",
  214. "libbt-sbc-decoder",
  215. "libbt-sbc-encoder",
  216. "libFraunhoferAAC",
  217. "libbtdevice",
  218. "libbt-hci",
  219. "libosi",
  220. "libbt-protos-lite",
  221. ],
  222. whole_static_libs: [
  223. "libbluetooth-for-tests",
  224. ],
  225. }
  226. cc_test {
  227. name: "net_test_stack_rfcomm",
  228. defaults: ["fluoride_defaults"],
  229. test_suites: ["device-tests"],
  230. host_supported: true,
  231. local_include_dirs: [
  232. "include",
  233. "btm",
  234. "l2cap",
  235. "smp",
  236. "rfcomm",
  237. "test/common",
  238. ],
  239. include_dirs: [
  240. "system/bt",
  241. "system/bt/internal_include",
  242. "system/bt/btcore/include",
  243. "system/bt/hci/include",
  244. "system/bt/utils/include",
  245. ],
  246. srcs: [
  247. "rfcomm/port_api.cc",
  248. "rfcomm/port_rfc.cc",
  249. "rfcomm/port_utils.cc",
  250. "rfcomm/rfc_l2cap_if.cc",
  251. "rfcomm/rfc_mx_fsm.cc",
  252. "rfcomm/rfc_port_fsm.cc",
  253. "rfcomm/rfc_port_if.cc",
  254. "rfcomm/rfc_ts_frames.cc",
  255. "rfcomm/rfc_utils.cc",
  256. "test/common/mock_btm_layer.cc",
  257. "test/common/mock_btsnoop_module.cc",
  258. "test/common/mock_btu_layer.cc",
  259. "test/common/mock_l2cap_layer.cc",
  260. "test/common/stack_test_packet_utils.cc",
  261. "test/rfcomm/stack_rfcomm_test.cc",
  262. "test/rfcomm/stack_rfcomm_test_main.cc",
  263. "test/rfcomm/stack_rfcomm_test_utils.cc",
  264. "test/rfcomm/stack_rfcomm_test_utils_test.cc",
  265. ],
  266. shared_libs: [
  267. "libcutils",
  268. "libprotobuf-cpp-lite",
  269. "libcrypto",
  270. ],
  271. static_libs: [
  272. "liblog",
  273. "libgmock",
  274. "libosi",
  275. "libbt-common",
  276. "libbt-protos-lite",
  277. ],
  278. sanitize: {
  279. cfi: false,
  280. },
  281. }
  282. // Bluetooth stack smp unit tests for target
  283. // ========================================================
  284. cc_test {
  285. name: "net_test_stack_smp",
  286. defaults: ["fluoride_defaults"],
  287. test_suites: ["device-tests"],
  288. local_include_dirs: [
  289. "include",
  290. "btm",
  291. "l2cap",
  292. "smp",
  293. ],
  294. include_dirs: [
  295. "system/bt",
  296. "system/bt/internal_include",
  297. "system/bt/btcore/include",
  298. "system/bt/hci/include",
  299. "system/bt/utils/include",
  300. ],
  301. srcs: crypto_toolbox_srcs + [
  302. "smp/smp_keys.cc",
  303. "smp/p_256_curvepara.cc",
  304. "smp/p_256_ecc_pp.cc",
  305. "smp/p_256_multprecision.cc",
  306. "smp/smp_api.cc",
  307. "smp/smp_main.cc",
  308. "smp/smp_utils.cc",
  309. "test/crypto_toolbox_test.cc",
  310. "test/stack_smp_test.cc",
  311. ],
  312. shared_libs: [
  313. "libcutils",
  314. ],
  315. static_libs: [
  316. "liblog",
  317. "libgmock",
  318. "libosi",
  319. ],
  320. }
  321. // Bluetooth stack multi-advertising unit tests for target
  322. // ========================================================
  323. cc_test {
  324. name: "net_test_stack_multi_adv",
  325. defaults: ["fluoride_defaults"],
  326. test_suites: ["device-tests"],
  327. local_include_dirs: [
  328. "include",
  329. "btm",
  330. ],
  331. include_dirs: [
  332. "system/bt",
  333. "system/bt/internal_include",
  334. "system/bt/btcore/include",
  335. "system/bt/hci/include",
  336. "system/bt/internal_include",
  337. "system/bt/utils/include",
  338. ],
  339. srcs: [
  340. "btm/btm_ble_multi_adv.cc",
  341. "test/ble_advertiser_test.cc",
  342. ],
  343. shared_libs: [
  344. "libcutils",
  345. ],
  346. static_libs: [
  347. "libbluetooth-types",
  348. "liblog",
  349. "libgmock",
  350. ],
  351. sanitize: {
  352. cfi: false,
  353. },
  354. }
  355. // Bluetooth stack advertise data parsing unit tests for target
  356. // =============================================================
  357. cc_test {
  358. name: "net_test_stack_ad_parser",
  359. defaults: ["fluoride_defaults"],
  360. test_suites: ["device-tests"],
  361. local_include_dirs: [
  362. "include",
  363. ],
  364. srcs: [
  365. "test/ad_parser_unittest.cc",
  366. ],
  367. static_libs: [
  368. "libbluetooth-types",
  369. "liblog",
  370. "libgmock",
  371. ],
  372. }
  373. // Bluetooth stack message loop tests for target
  374. // ========================================================
  375. cc_test {
  376. name: "net_test_btu_message_loop",
  377. defaults: ["fluoride_defaults"],
  378. local_include_dirs: [
  379. "include",
  380. "btm",
  381. ],
  382. include_dirs: [
  383. "system/bt/",
  384. "system/bt/internal_include",
  385. "system/bt/btcore/include",
  386. "system/bt/bta/include",
  387. ],
  388. srcs: [
  389. "btu/btu_task.cc",
  390. "test/stack_btu_test.cc",
  391. ],
  392. shared_libs: [
  393. "liblog",
  394. "libcutils",
  395. "libprotobuf-cpp-lite",
  396. ],
  397. static_libs: [
  398. "libbt-common",
  399. "libbluetooth-types",
  400. "libgmock",
  401. "libosi",
  402. "libbt-protos-lite",
  403. ],
  404. sanitize: {
  405. cfi: false,
  406. },
  407. }
  408. // Bluetooth stack connection multiplexing
  409. // ========================================================
  410. cc_test {
  411. name: "net_test_gatt_conn_multiplexing",
  412. defaults: ["fluoride_defaults"],
  413. local_include_dirs: [
  414. "include",
  415. "btm",
  416. ],
  417. include_dirs: [
  418. "system/bt",
  419. "system/bt/internal_include",
  420. "system/bt/btcore/include",
  421. "system/bt/hci/include",
  422. "system/bt/internal_include",
  423. "system/bt/utils/include",
  424. ],
  425. srcs: [
  426. "gatt/connection_manager.cc",
  427. "test/gatt_connection_manager_test.cc",
  428. ],
  429. shared_libs: [
  430. "libcutils",
  431. ],
  432. static_libs: [
  433. "libbluetooth-types",
  434. "liblog",
  435. "libgmock",
  436. ],
  437. sanitize: {
  438. cfi: false,
  439. },
  440. }