blob: 07999bc27f7d4b46a1d5f22ed5e2aae7ec8e36bb [file] [log] [blame]
#
# Copyright 2015 Google, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Nonstandard codecs are associated with 3P libs and must be contained in MMC
source_set("nonstandard_codecs") {
if (defined(use.bt_nonstandard_codecs) && use.bt_nonstandard_codecs) {
sources = [
"a2dp/a2dp_aac.cc",
"a2dp/a2dp_aac_decoder_linux.cc",
"a2dp/a2dp_aac_encoder_linux.cc",
"a2dp/a2dp_vendor.cc",
# Following are unimplemented
"a2dp/a2dp_vendor_aptx_linux.cc",
"a2dp/a2dp_vendor_aptx_hd_linux.cc",
"a2dp/a2dp_vendor_ldac_linux.cc",
"a2dp/a2dp_vendor_opus_linux.cc",
]
include_dirs = [
"//bt/system",
"//bt/system/bta/include",
"//bt/system/btif/include",
"//bt/system/include",
"//bt/system/stack",
"//bt/system/stack/include",
"//bt/system/utils/include",
]
deps = [
"//bt/system/gd/rust/shim:init_flags_bridge_header",
"//bt/system/stack/mmc",
]
configs += [
"//bt/system:target_defaults",
"//bt/system/log:log_defaults",
]
}
}
source_set("stack") {
sources = [
"a2dp/a2dp_api.cc",
"a2dp/a2dp_codec_config.cc",
"a2dp/a2dp_ext.cc",
"a2dp/a2dp_sbc.cc",
"a2dp/a2dp_sbc_decoder.cc",
"a2dp/a2dp_sbc_encoder.cc",
"a2dp/a2dp_sbc_up_sample.cc",
"acl/acl.cc",
"acl/ble_acl.cc",
"acl/btm_acl.cc",
"acl/btm_pm.cc",
"arbiter/acl_arbiter.cc",
"avct/avct_api.cc",
"avct/avct_bcb_act.cc",
"avct/avct_ccb.cc",
"avct/avct_l2c.cc",
"avct/avct_l2c_br.cc",
"avct/avct_lcb.cc",
"avct/avct_lcb_act.cc",
"avdt/avdt_ad.cc",
"avdt/avdt_api.cc",
"avdt/avdt_ccb.cc",
"avdt/avdt_ccb_act.cc",
"avdt/avdt_l2c.cc",
"avdt/avdt_msg.cc",
"avdt/avdt_scb.cc",
"avdt/avdt_scb_act.cc",
"avrc/avrc_api.cc",
"avrc/avrc_bld_ct.cc",
"avrc/avrc_bld_tg.cc",
"avrc/avrc_opt.cc",
"avrc/avrc_pars_ct.cc",
"avrc/avrc_pars_tg.cc",
"avrc/avrc_sdp.cc",
"avrc/avrc_utils.cc",
"bnep/bnep_api.cc",
"bnep/bnep_main.cc",
"bnep/bnep_utils.cc",
"btm/ble_scanner_hci_interface.cc",
"btm/btm_ble.cc",
"btm/btm_ble_addr.cc",
"btm/btm_ble_adv_filter.cc",
"btm/btm_ble_bgconn.cc",
"btm/btm_ble_cont_energy.cc",
"btm/btm_ble_gap.cc",
"btm/btm_ble_privacy.cc",
"btm/btm_ble_scanner.cc",
"btm/btm_ble_sec.cc",
"btm/btm_client_interface.cc",
"btm/btm_dev.cc",
"btm/btm_devctl.cc",
"btm/btm_inq.cc",
"btm/btm_iot_config.cc",
"btm/btm_iso.cc",
"btm/btm_main.cc",
"btm/btm_sco.cc",
"btm/btm_sco_hci.cc",
"btm/btm_sco_hfp_hal_linux.cc",
"btm/btm_sec.cc",
"btm/btm_sec_cb.cc",
"btm/btm_security_client_interface.cc",
"btm/security_event_parser.cc",
"btm/hfp_lc3_encoder_linux.cc",
"btm/hfp_lc3_decoder_linux.cc",
"btm/hfp_msbc_encoder.cc",
"btm/hfp_msbc_decoder.cc",
"btu/btu_event.cc",
"btu/btu_hcif.cc",
"btu/main_thread.cc",
"eatt/eatt.cc",
"gap/gap_ble.cc",
"gap/gap_conn.cc",
"gatt/att_protocol.cc",
"gatt/connection_manager.cc",
"gatt/gatt_api.cc",
"gatt/gatt_attr.cc",
"gatt/gatt_auth.cc",
"gatt/gatt_cl.cc",
"gatt/gatt_db.cc",
"gatt/gatt_main.cc",
"gatt/gatt_sr.cc",
"gatt/gatt_sr_hash.cc",
"gatt/gatt_utils.cc",
"hcic/hciblecmds.cc",
"hcic/hcicmds.cc",
"hid/hidd_api.cc",
"hid/hidd_conn.cc",
"hid/hidh_api.cc",
"hid/hidh_conn.cc",
"l2cap/l2c_api.cc",
"l2cap/l2c_ble.cc",
"l2cap/l2c_ble_conn_params.cc",
"l2cap/l2c_csm.cc",
"l2cap/l2c_fcr.cc",
"l2cap/l2c_link.cc",
"l2cap/l2c_main.cc",
"l2cap/l2c_utils.cc",
"metrics/stack_metrics_logging.cc",
"pan/pan_api.cc",
"pan/pan_main.cc",
"pan/pan_utils.cc",
"rfcomm/port_api.cc",
"rfcomm/port_rfc.cc",
"rfcomm/port_utils.cc",
"rfcomm/rfc_l2cap_if.cc",
"rfcomm/rfc_mx_fsm.cc",
"rfcomm/rfc_port_fsm.cc",
"rfcomm/rfc_port_if.cc",
"rfcomm/rfc_ts_frames.cc",
"rfcomm/rfc_utils.cc",
"sdp/sdp_api.cc",
"sdp/sdp_db.cc",
"sdp/sdp_discovery.cc",
"sdp/sdp_main.cc",
"sdp/sdp_server.cc",
"sdp/sdp_utils.cc",
"smp/p_256_curvepara.cc",
"smp/p_256_ecc_pp.cc",
"smp/p_256_multprecision.cc",
"smp/smp_act.cc",
"smp/smp_api.cc",
"smp/smp_br_main.cc",
"smp/smp_keys.cc",
"smp/smp_l2c.cc",
"smp/smp_main.cc",
"smp/smp_utils.cc",
"srvc/srvc_dis.cc",
"srvc/srvc_eng.cc",
]
include_dirs = [
".",
"include",
"avct",
"btm",
"avrc",
"l2cap",
"avdt",
"gatt",
"gap",
"pan",
"bnep",
"eatt",
"hid",
"metrics",
"sdp",
"smp",
"srvc",
"//bt/system/",
"//bt/system/bta/include",
"//bt/system/bta/sys",
"//bt/system/btif/include",
"//bt/system/ctrlr/include",
"//bt/system/gd",
"//bt/system/hcis",
"//bt/system/linux_include",
"//bt/system/rpc/include",
"//bt/system/types",
"//bt/system/udrv/include",
"//bt/system/vnd/ble",
"//bt/system/vnd/include",
]
deps = [
"//bt/system/gd/crypto_toolbox:crypto_toolbox",
":nonstandard_codecs",
"//bt/system:libbt-platform-protos-lite",
"//bt/system/gd/rust/shim:init_flags_bridge_header",
"//bt/system/stack/mmc",
"//bt/system/types",
]
configs += [
"//bt/system:target_defaults",
"//bt/system/log:log_defaults",
]
}
if (use.test) {
executable("net_test_btm_iso") {
sources = [
"btm/btm_iso.cc",
"test/btm_iso_test.cc",
"test/common/mock_controller.cc",
"test/common/mock_gatt_layer.cc",
"test/common/mock_hcic_layer.cc",
]
include_dirs = [
"btm",
"include",
"test/common",
"//bt/system/packet/tests",
]
deps = [
"//bt/system/common",
"//bt/system/osi",
]
configs += [
"//bt/system:external_gmock_main",
"//bt/system:target_defaults",
]
}
}
if (defined(use.android) && use.android) {
executable("stack_unittests") {
sources = [
"test/stack_a2dp_test.cc",
"test/stack_avrcp_test.cc",
]
include_dirs = [
"include",
"//bt/system/",
"//bt/system/bta/eatt",
"//bt/system/bta/include",
"//bt/system/bta/sys",
"//bt/system/embdrv/sbc/encoder/include",
"//bt/system/stack/a2dp",
"//bt/system/stack/btm",
"//bt/system/stack/include",
"//bt/system/udrv/include",
"//bt/system/vnd/include",
]
libs = [
"dl",
"fmt",
"pthread",
"resolv",
"rt",
"z",
]
deps = [
":stack",
"//bt/system/btcore",
"//bt/system/device",
"//bt/system/embdrv/g722",
"//bt/system/embdrv/sbc",
"//bt/system/hci",
"//bt/system/main:bluetooth",
"//bt/system/osi",
"//bt/system/types",
]
configs += [
"//bt/system:external_tinyxml2",
"//bt/system:external_gmock_main",
"//bt/system:target_defaults",
]
}
executable("net_test_stack_smp") {
sources = [
"smp/p_256_curvepara.cc",
"smp/p_256_ecc_pp.cc",
"smp/p_256_multprecision.cc",
"smp/smp_api.cc",
"smp/smp_keys.cc",
"smp/smp_main.cc",
"smp/smp_utils.cc",
"test/stack_smp_test.cc",
]
include_dirs = [
"//bt/system/",
"//bt/system/linux_include",
"//bt/system/bta/include",
"//bt/system/bta/sys",
"//bt/system/embdrv/sbc/encoder/include",
"//bt/system/stack/a2dp",
"//bt/system/stack/l2cap",
"//bt/system/stack/btm",
"//bt/system/stack/include",
"//bt/system/udrv/include",
"//bt/system/vnd/include",
]
libs = [
"dl",
"fmt",
"pthread",
"resolv",
"rt",
"z",
]
deps = [
"//bt/system/gd:crypto_toolbox",
"//bt/system/osi",
"//bt/system/types",
]
configs += [
"//bt/system:external_tinyxml2",
"//bt/system:external_gmock_main",
"//bt/system:target_defaults",
]
}
}