BUILD.gn 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351
  1. #
  2. # Copyright 2015 Google, Inc.
  3. #
  4. # Licensed under the Apache License, Version 2.0 (the "License");
  5. # you may not use this file except in compliance with the License.
  6. # You may obtain a copy of the License at:
  7. #
  8. # http://www.apache.org/licenses/LICENSE-2.0
  9. #
  10. # Unless required by applicable law or agreed to in writing, software
  11. # distributed under the License is distributed on an "AS IS" BASIS,
  12. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. # See the License for the specific language governing permissions and
  14. # limitations under the License.
  15. #
  16. static_library("crypto_toolbox") {
  17. sources = [
  18. "crypto_toolbox/crypto_toolbox.cc",
  19. "crypto_toolbox/aes.cc",
  20. "crypto_toolbox/aes_cmac.cc",
  21. ]
  22. include_dirs = [
  23. "//",
  24. ]
  25. deps = [
  26. "//third_party/libchrome:base",
  27. ]
  28. }
  29. static_library("stack") {
  30. sources = [
  31. "a2dp/a2dp_aac.cc",
  32. "a2dp/a2dp_aac_decoder.cc",
  33. "a2dp/a2dp_aac_encoder.cc",
  34. "a2dp/a2dp_api.cc",
  35. "a2dp/a2dp_codec_config.cc",
  36. "a2dp/a2dp_sbc.cc",
  37. "a2dp/a2dp_sbc_decoder.cc",
  38. "a2dp/a2dp_sbc_encoder.cc",
  39. "a2dp/a2dp_sbc_up_sample.cc",
  40. "a2dp/a2dp_vendor.cc",
  41. "a2dp/a2dp_vendor_aptx.cc",
  42. "a2dp/a2dp_vendor_aptx_encoder.cc",
  43. "a2dp/a2dp_vendor_aptx_hd.cc",
  44. "a2dp/a2dp_vendor_aptx_hd_encoder.cc",
  45. "a2dp/a2dp_vendor_ldac.cc",
  46. "a2dp/a2dp_vendor_ldac_abr.cc",
  47. "a2dp/a2dp_vendor_ldac_decoder.cc",
  48. "a2dp/a2dp_vendor_ldac_encoder.cc",
  49. "avct/avct_api.cc",
  50. "avct/avct_bcb_act.cc",
  51. "avct/avct_ccb.cc",
  52. "avct/avct_l2c.cc",
  53. "avct/avct_l2c_br.cc",
  54. "avct/avct_lcb.cc",
  55. "avct/avct_lcb_act.cc",
  56. "avdt/avdt_ad.cc",
  57. "avdt/avdt_api.cc",
  58. "avdt/avdt_ccb.cc",
  59. "avdt/avdt_ccb_act.cc",
  60. "avdt/avdt_l2c.cc",
  61. "avdt/avdt_msg.cc",
  62. "avdt/avdt_scb.cc",
  63. "avdt/avdt_scb_act.cc",
  64. "avrc/avrc_api.cc",
  65. "avrc/avrc_bld_ct.cc",
  66. "avrc/avrc_bld_tg.cc",
  67. "avrc/avrc_opt.cc",
  68. "avrc/avrc_pars_ct.cc",
  69. "avrc/avrc_pars_tg.cc",
  70. "avrc/avrc_sdp.cc",
  71. "avrc/avrc_utils.cc",
  72. "bnep/bnep_api.cc",
  73. "bnep/bnep_main.cc",
  74. "bnep/bnep_utils.cc",
  75. "btm/ble_advertiser_hci_interface.cc",
  76. "btm/btm_acl.cc",
  77. "btm/btm_ble.cc",
  78. "btm/btm_ble_addr.cc",
  79. "btm/btm_ble_adv_filter.cc",
  80. "btm/btm_ble_batchscan.cc",
  81. "btm/btm_ble_bgconn.cc",
  82. "btm/btm_ble_cont_energy.cc",
  83. "btm/btm_ble_gap.cc",
  84. "btm/btm_ble_multi_adv.cc",
  85. "btm/btm_ble_privacy.cc",
  86. "btm/btm_dev.cc",
  87. "btm/btm_devctl.cc",
  88. "btm/btm_inq.cc",
  89. "btm/btm_main.cc",
  90. "btm/btm_pm.cc",
  91. "btm/btm_sco.cc",
  92. "btm/btm_sec.cc",
  93. "btu/btu_hcif.cc",
  94. "btu/btu_init.cc",
  95. "btu/btu_task.cc",
  96. "gap/gap_ble.cc",
  97. "gap/gap_conn.cc",
  98. "gatt/att_protocol.cc",
  99. "gatt/connection_manager.cc",
  100. "gatt/gatt_api.cc",
  101. "gatt/gatt_attr.cc",
  102. "gatt/gatt_auth.cc",
  103. "gatt/gatt_cl.cc",
  104. "gatt/gatt_db.cc",
  105. "gatt/gatt_main.cc",
  106. "gatt/gatt_sr.cc",
  107. "gatt/gatt_utils.cc",
  108. "hcic/hciblecmds.cc",
  109. "hcic/hcicmds.cc",
  110. "hid/hidh_api.cc",
  111. "hid/hidh_conn.cc",
  112. "hid/hidd_api.cc",
  113. "hid/hidd_conn.cc",
  114. "l2cap/l2c_api.cc",
  115. "l2cap/l2c_ble.cc",
  116. "l2cap/l2c_csm.cc",
  117. "l2cap/l2c_fcr.cc",
  118. "l2cap/l2c_link.cc",
  119. "l2cap/l2c_main.cc",
  120. "l2cap/l2c_utils.cc",
  121. "l2cap/l2cap_client.cc",
  122. "pan/pan_api.cc",
  123. "pan/pan_main.cc",
  124. "pan/pan_utils.cc",
  125. "rfcomm/port_api.cc",
  126. "rfcomm/port_rfc.cc",
  127. "rfcomm/port_utils.cc",
  128. "rfcomm/rfc_l2cap_if.cc",
  129. "rfcomm/rfc_mx_fsm.cc",
  130. "rfcomm/rfc_port_fsm.cc",
  131. "rfcomm/rfc_port_if.cc",
  132. "rfcomm/rfc_ts_frames.cc",
  133. "rfcomm/rfc_utils.cc",
  134. "sdp/sdp_api.cc",
  135. "sdp/sdp_db.cc",
  136. "sdp/sdp_discovery.cc",
  137. "sdp/sdp_main.cc",
  138. "sdp/sdp_server.cc",
  139. "sdp/sdp_utils.cc",
  140. "smp/p_256_curvepara.cc",
  141. "smp/p_256_ecc_pp.cc",
  142. "smp/p_256_multprecision.cc",
  143. "smp/smp_act.cc",
  144. "smp/smp_api.cc",
  145. "smp/smp_br_main.cc",
  146. "smp/smp_keys.cc",
  147. "smp/smp_l2c.cc",
  148. "smp/smp_main.cc",
  149. "smp/smp_utils.cc",
  150. "srvc/srvc_dis.cc",
  151. "srvc/srvc_eng.cc",
  152. ]
  153. include_dirs = [
  154. "include",
  155. "avct",
  156. "btm",
  157. "avrc",
  158. "l2cap",
  159. "avdt",
  160. "gatt",
  161. "gap",
  162. "pan",
  163. "bnep",
  164. "hid",
  165. "sdp",
  166. "smp",
  167. "srvc",
  168. "//linux_include",
  169. "//internal_include",
  170. "//btcore/include",
  171. "//vnd/include",
  172. "//vnd/ble",
  173. "//btif/include",
  174. "//hci/include",
  175. "//internal_include",
  176. "//udrv/include",
  177. "//rpc/include",
  178. "//hcis",
  179. "//ctrlr/include",
  180. "//bta/include",
  181. "//bta/sys",
  182. "//utils/include",
  183. "//",
  184. ]
  185. deps = [
  186. ":crypto_toolbox",
  187. "//types",
  188. "//third_party/libchrome:base",
  189. "//third_party/libldac:libldacBT_enc",
  190. "//third_party/libldac:libldacBT_abr",
  191. "//third_party/aac:libFraunhoferAAC",
  192. ]
  193. }
  194. executable("stack_unittests") {
  195. testonly = true
  196. sources = [
  197. "test/stack_a2dp_test.cc",
  198. ]
  199. include_dirs = [
  200. "include",
  201. "//",
  202. "//bta/include",
  203. "//bta/sys",
  204. "//btcore/include",
  205. "//embdrv/sbc/encoder/include",
  206. "//hci/include",
  207. "//internal_include",
  208. "//stack/a2dp",
  209. "//stack/btm",
  210. "//stack/include",
  211. "//third_party/tinyxml2",
  212. "//udrv/include",
  213. "//utils/include",
  214. "//vnd/include"
  215. ]
  216. libs = [
  217. "-ldl",
  218. "-lpthread",
  219. "-lresolv",
  220. "-lrt",
  221. "-lz",
  222. "-latomic",
  223. ]
  224. deps = [
  225. ":stack",
  226. "//osi",
  227. "//btcore",
  228. "//device",
  229. "//embdrv/sbc",
  230. "//embdrv/g722",
  231. "//hci",
  232. "//types",
  233. "//main:bluetooth",
  234. "//third_party/googletest:gmock_main",
  235. "//third_party/libchrome:base",
  236. ]
  237. }
  238. executable("net_test_stack_crypto_toolbox") {
  239. testonly = true
  240. sources = [
  241. "test/crypto_toolbox_test.cc",
  242. ]
  243. include_dirs = [
  244. "//",
  245. ]
  246. deps = [
  247. ":crypto_toolbox",
  248. "//third_party/googletest:gmock_main",
  249. "//third_party/libchrome:base",
  250. ]
  251. }
  252. executable("net_test_stack_smp") {
  253. testonly = true
  254. sources = [
  255. "smp/p_256_curvepara.cc",
  256. "smp/p_256_ecc_pp.cc",
  257. "smp/p_256_multprecision.cc",
  258. "smp/smp_keys.cc",
  259. "smp/smp_api.cc",
  260. "smp/smp_main.cc",
  261. "smp/smp_utils.cc",
  262. "test/stack_smp_test.cc",
  263. ]
  264. include_dirs = [
  265. "//",
  266. "//linux_include",
  267. "//internal_include",
  268. "//btcore/include",
  269. "//hci/include",
  270. "//utils/include",
  271. "//bta/include",
  272. "//bta/sys",
  273. "//btcore/include",
  274. "//embdrv/sbc/encoder/include",
  275. "//hci/include",
  276. "//internal_include",
  277. "//stack/a2dp",
  278. "//stack/l2cap",
  279. "//stack/btm",
  280. "//stack/include",
  281. "//third_party/tinyxml2",
  282. "//udrv/include",
  283. "//utils/include",
  284. "//vnd/include"
  285. ]
  286. libs = [
  287. "-ldl",
  288. "-lpthread",
  289. "-lresolv",
  290. "-lrt",
  291. "-lz",
  292. "-latomic",
  293. ]
  294. deps = [
  295. ":crypto_toolbox",
  296. "//osi",
  297. "//types",
  298. "//third_party/googletest:gmock_main",
  299. "//third_party/libchrome:base",
  300. ]
  301. }
  302. executable("net_test_stack_multi_adv") {
  303. testonly = true
  304. sources = [
  305. "btm/btm_ble_multi_adv.cc",
  306. "test/ble_advertiser_test.cc",
  307. ]
  308. include_dirs = [
  309. "include",
  310. "//",
  311. "//btcore/include",
  312. "//hci/include",
  313. "//internal_include",
  314. "//stack/btm",
  315. ]
  316. libs = [
  317. "-ldl",
  318. "-lpthread",
  319. "-lresolv",
  320. "-lrt",
  321. "-lz",
  322. "-latomic",
  323. ]
  324. deps = [
  325. "//types",
  326. "//third_party/googletest:gmock_main",
  327. "//third_party/libchrome:base",
  328. ]
  329. }