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