blob: 00680c85e7c92ed3b152be0a620ac9f17b28c6de [file] [log] [blame]
Arman Uguray9ca3fb82015-05-26 14:50:36 -07001#
Jakub Pawlowski5b790fe2017-09-18 09:00:20 -07002# Copyright 2015 Google, Inc.
Arman Uguray9ca3fb82015-05-26 14:50:36 -07003#
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
Jakub Pawlowski430e59d2018-06-21 14:23:47 +020017static_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
Arman Uguray2c494e12015-05-29 14:43:20 -070033static_library("stack") {
Scott James Remnant4c292312015-05-12 13:58:49 -070034 sources = [
Jakub Pawlowskieff4dd52017-02-20 20:18:51 +010035 "a2dp/a2dp_aac.cc",
Bailey Forrest7e2ab692017-06-16 15:38:03 -070036 "a2dp/a2dp_aac_decoder.cc",
Jakub Pawlowskieff4dd52017-02-20 20:18:51 +010037 "a2dp/a2dp_aac_encoder.cc",
Pavlin Radoslavovf66f4e92016-10-14 15:14:37 -070038 "a2dp/a2dp_api.cc",
Jakub Pawlowskia9743d82017-01-09 00:02:58 -080039 "a2dp/a2dp_codec_config.cc",
Pavlin Radoslavovf66f4e92016-10-14 15:14:37 -070040 "a2dp/a2dp_sbc.cc",
Bailey Forrest7e2ab692017-06-16 15:38:03 -070041 "a2dp/a2dp_sbc_decoder.cc",
Pavlin Radoslavovf66f4e92016-10-14 15:14:37 -070042 "a2dp/a2dp_sbc_encoder.cc",
43 "a2dp/a2dp_sbc_up_sample.cc",
44 "a2dp/a2dp_vendor.cc",
Jakub Pawlowskia9743d82017-01-09 00:02:58 -080045 "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",
Jakub Pawlowski17f449d2017-04-10 02:19:29 -070050 "a2dp/a2dp_vendor_ldac_abr.cc",
Jakub Pawlowskic8dcd252018-10-25 15:12:43 +020051 "a2dp/a2dp_vendor_ldac_decoder.cc",
Jakub Pawlowskia9743d82017-01-09 00:02:58 -080052 "a2dp/a2dp_vendor_ldac_encoder.cc",
Pavlin Radoslavovb2a292b2016-10-14 19:34:48 -070053 "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",
Jakub Pawlowskicc8d3ab2016-10-13 15:43:15 -070079 "btm/ble_advertiser_hci_interface.cc",
Pavlin Radoslavovb2a292b2016-10-14 19:34:48 -070080 "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",
Jakub Pawlowski488005b2016-05-25 17:10:56 -070085 "btm/btm_ble_bgconn.cc",
Pavlin Radoslavovb2a292b2016-10-14 19:34:48 -070086 "btm/btm_ble_cont_energy.cc",
87 "btm/btm_ble_gap.cc",
Jakub Pawlowski01487262016-09-05 04:31:34 -070088 "btm/btm_ble_multi_adv.cc",
Pavlin Radoslavovb2a292b2016-10-14 19:34:48 -070089 "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",
Pavlin Radoslavovb2a292b2016-10-14 19:34:48 -0700100 "gap/gap_ble.cc",
101 "gap/gap_conn.cc",
Pavlin Radoslavovb2a292b2016-10-14 19:34:48 -0700102 "gatt/att_protocol.cc",
Jakub Pawlowskiddba8a62018-11-09 11:53:11 +0100103 "gatt/connection_manager.cc",
Pavlin Radoslavovb2a292b2016-10-14 19:34:48 -0700104 "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",
Hemant Gupta8843cc82014-04-18 12:34:55 +0530116 "hid/hidd_api.cc",
117 "hid/hidd_conn.cc",
Pavlin Radoslavovb2a292b2016-10-14 19:34:48 -0700118 "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",
Pavlin Radoslavovb2a292b2016-10-14 19:34:48 -0700124 "l2cap/l2c_utils.cc",
125 "l2cap/l2cap_client.cc",
Pavlin Radoslavovb2a292b2016-10-14 19:34:48 -0700126 "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",
Pavlin Radoslavovb2a292b2016-10-14 19:34:48 -0700144 "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",
Pavlin Radoslavovb2a292b2016-10-14 19:34:48 -0700150 "smp/smp_keys.cc",
151 "smp/smp_l2c.cc",
152 "smp/smp_main.cc",
153 "smp/smp_utils.cc",
Pavlin Radoslavovb2a292b2016-10-14 19:34:48 -0700154 "srvc/srvc_dis.cc",
155 "srvc/srvc_eng.cc",
Scott James Remnant4c292312015-05-12 13:58:49 -0700156 ]
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",
Jakub Pawlowski292ab252018-10-23 15:57:20 +0200173 "//linux_include",
Jakub Pawlowski9e814612018-05-25 09:31:26 -0700174 "//internal_include",
Scott James Remnant4c292312015-05-12 13:58:49 -0700175 "//btcore/include",
176 "//vnd/include",
177 "//vnd/ble",
178 "//btif/include",
179 "//hci/include",
Jakub Pawlowskic4510682017-10-18 04:03:41 -0700180 "//internal_include",
Scott James Remnant4c292312015-05-12 13:58:49 -0700181 "//udrv/include",
182 "//rpc/include",
183 "//hcis",
184 "//ctrlr/include",
185 "//bta/include",
186 "//bta/sys",
187 "//utils/include",
188 "//",
189 ]
Jakub Pawlowski0a009c32016-09-06 07:42:36 -0700190
191 deps = [
Jakub Pawlowski430e59d2018-06-21 14:23:47 +0200192 ":crypto_toolbox",
Jakub Pawlowskid3988fd2017-07-14 21:08:47 -0700193 "//types",
Jakub Pawlowskieff4dd52017-02-20 20:18:51 +0100194 "//third_party/libchrome:base",
195 "//third_party/libldac:libldacBT_enc",
Pavlin Radoslavove4f2b612017-03-28 18:40:32 -0700196 "//third_party/libldac:libldacBT_abr",
Jakub Pawlowskieff4dd52017-02-20 20:18:51 +0100197 "//third_party/aac:libFraunhoferAAC",
Jakub Pawlowski0a009c32016-09-06 07:42:36 -0700198 ]
Scott James Remnant4c292312015-05-12 13:58:49 -0700199}
Jakub Pawlowskie47b7692016-09-28 07:36:54 -0700200
201executable("stack_unittests") {
202 testonly = true
203 sources = [
Pavlin Radoslavovf66f4e92016-10-14 15:14:37 -0700204 "test/stack_a2dp_test.cc",
Jakub Pawlowskie47b7692016-09-28 07:36:54 -0700205 ]
206
207 include_dirs = [
208 "include",
209 "//",
Jakub Pawlowskie47b7692016-09-28 07:36:54 -0700210 "//bta/include",
211 "//bta/sys",
212 "//btcore/include",
213 "//embdrv/sbc/encoder/include",
214 "//hci/include",
Jakub Pawlowskic4510682017-10-18 04:03:41 -0700215 "//internal_include",
Jakub Pawlowskie47b7692016-09-28 07:36:54 -0700216 "//stack/a2dp",
217 "//stack/btm",
218 "//stack/include",
219 "//third_party/tinyxml2",
220 "//udrv/include",
221 "//utils/include",
222 "//vnd/include"
223 ]
224
Jakub Pawlowski029a43b2016-10-19 23:31:13 -0700225 libs = [
226 "-ldl",
227 "-lpthread",
228 "-lresolv",
229 "-lrt",
230 "-lz",
231 "-latomic",
232 ]
233
Jakub Pawlowskie47b7692016-09-28 07:36:54 -0700234 deps = [
235 ":stack",
236 "//osi",
237 "//btcore",
238 "//device",
Jakub Pawlowskia9743d82017-01-09 00:02:58 -0800239 "//embdrv/sbc",
Jakub Pawlowski9e814612018-05-25 09:31:26 -0700240 "//embdrv/g722",
Jakub Pawlowskie47b7692016-09-28 07:36:54 -0700241 "//hci",
Jakub Pawlowskid3988fd2017-07-14 21:08:47 -0700242 "//types",
Jakub Pawlowski121882e2017-10-19 19:51:57 -0700243 "//main:bluetooth",
Jakub Pawlowskie47b7692016-09-28 07:36:54 -0700244 "//third_party/googletest:gmock_main",
245 "//third_party/libchrome:base",
246 ]
247}
248
Jakub Pawlowski430e59d2018-06-21 14:23:47 +0200249executable("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 = [
Jakub Pawlowski83db4992018-11-20 19:27:11 +0100269 "smp/p_256_curvepara.cc",
270 "smp/p_256_ecc_pp.cc",
271 "smp/p_256_multprecision.cc",
Jakub Pawlowski430e59d2018-06-21 14:23:47 +0200272 "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 "//",
Jakub Pawlowski83db4992018-11-20 19:27:11 +0100281 "//linux_include",
Jakub Pawlowski430e59d2018-06-21 14:23:47 +0200282 "//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
Jakub Pawlowski6c0ca7a2016-10-20 10:19:50 -0700320executable("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",
Jakub Pawlowskic4510682017-10-18 04:03:41 -0700332 "//internal_include",
Jakub Pawlowski6c0ca7a2016-10-20 10:19:50 -0700333 "//stack/btm",
334 ]
335
Jakub Pawlowskid3988fd2017-07-14 21:08:47 -0700336 libs = [
Jakub Pawlowski6c0ca7a2016-10-20 10:19:50 -0700337 "-ldl",
338 "-lpthread",
339 "-lresolv",
340 "-lrt",
341 "-lz",
342 "-latomic",
343 ]
344
345 deps = [
Jakub Pawlowskid3988fd2017-07-14 21:08:47 -0700346 "//types",
Jakub Pawlowski6c0ca7a2016-10-20 10:19:50 -0700347 "//third_party/googletest:gmock_main",
348 "//third_party/libchrome:base",
349 ]
350}
351