2019-04-06 09:08:09 -04:00
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
2017-10-27 15:43:34 +02:00
|
|
|
zephyr_library()
|
|
|
|
zephyr_library_link_libraries(subsys__bluetooth)
|
|
|
|
|
2024-03-01 15:29:10 +08:00
|
|
|
add_subdirectory_ifdef(CONFIG_BT_CLASSIC classic)
|
|
|
|
|
2020-07-24 17:34:32 +02:00
|
|
|
zephyr_library_sources_ifdef(CONFIG_BT_HCI_RAW hci_raw.c hci_common.c)
|
2021-04-17 13:33:20 +02:00
|
|
|
zephyr_library_sources_ifdef(CONFIG_BT_MONITOR monitor.c)
|
2017-10-27 15:43:34 +02:00
|
|
|
zephyr_library_sources_ifdef(CONFIG_BT_TINYCRYPT_ECC hci_ecc.c)
|
2018-04-26 22:05:26 +03:00
|
|
|
zephyr_library_sources_ifdef(CONFIG_BT_SETTINGS settings.c)
|
2020-01-29 13:03:23 +01:00
|
|
|
zephyr_library_sources_ifdef(CONFIG_BT_HOST_CCM aes_ccm.c)
|
2022-05-30 16:08:11 +02:00
|
|
|
zephyr_library_sources_ifdef(CONFIG_BT_LONG_WQ long_wq.c)
|
2017-10-27 15:43:34 +02:00
|
|
|
|
|
|
|
if(CONFIG_BT_HCI_HOST)
|
|
|
|
zephyr_library_sources(
|
|
|
|
uuid.c
|
2020-11-12 15:29:51 +01:00
|
|
|
addr.c
|
2020-11-12 15:30:43 +01:00
|
|
|
buf.c
|
2023-03-15 15:21:33 +01:00
|
|
|
data.c
|
2017-10-27 15:43:34 +02:00
|
|
|
hci_core.c
|
2020-07-24 17:34:32 +02:00
|
|
|
hci_common.c
|
2021-03-08 14:24:34 +01:00
|
|
|
id.c
|
2017-10-27 15:43:34 +02:00
|
|
|
)
|
2021-03-08 14:30:34 +01:00
|
|
|
zephyr_library_sources_ifdef(
|
|
|
|
CONFIG_BT_BROADCASTER
|
|
|
|
adv.c
|
|
|
|
)
|
2021-03-08 14:30:19 +01:00
|
|
|
zephyr_library_sources_ifdef(
|
|
|
|
CONFIG_BT_OBSERVER
|
|
|
|
scan.c
|
|
|
|
)
|
2024-06-04 13:47:34 +02:00
|
|
|
|
|
|
|
if(CONFIG_BT_USE_PSA_API)
|
|
|
|
zephyr_library_sources_ifdef(CONFIG_BT_HOST_CRYPTO crypto_psa.c)
|
|
|
|
else()
|
|
|
|
zephyr_library_sources_ifdef(CONFIG_BT_HOST_CRYPTO crypto_tc.c)
|
|
|
|
endif()
|
|
|
|
|
2021-02-01 14:41:32 +01:00
|
|
|
zephyr_library_sources_ifdef(
|
|
|
|
CONFIG_BT_ECC
|
|
|
|
ecc.c
|
|
|
|
)
|
2017-10-27 15:43:34 +02:00
|
|
|
|
|
|
|
if(CONFIG_BT_CONN)
|
|
|
|
zephyr_library_sources(
|
|
|
|
conn.c
|
|
|
|
l2cap.c
|
|
|
|
att.c
|
|
|
|
gatt.c
|
|
|
|
)
|
|
|
|
|
|
|
|
if(CONFIG_BT_SMP)
|
|
|
|
zephyr_library_sources(
|
|
|
|
smp.c
|
|
|
|
keys.c
|
|
|
|
)
|
|
|
|
else()
|
|
|
|
zephyr_library_sources(
|
|
|
|
smp_null.c
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
endif()
|
2020-10-14 00:50:47 -07:00
|
|
|
|
2021-01-20 14:11:01 +01:00
|
|
|
zephyr_library_sources_ifdef(
|
|
|
|
CONFIG_BT_ISO
|
|
|
|
iso.c
|
2021-06-24 15:37:19 +02:00
|
|
|
conn.c
|
2021-01-20 14:11:01 +01:00
|
|
|
)
|
|
|
|
|
2020-10-14 00:50:47 -07:00
|
|
|
if(CONFIG_BT_DF)
|
|
|
|
zephyr_library_sources(
|
|
|
|
direction.c
|
|
|
|
)
|
|
|
|
endif()
|
2017-10-27 15:43:34 +02:00
|
|
|
endif()
|
2020-06-15 14:01:46 +02:00
|
|
|
|
2022-11-02 14:31:13 +01:00
|
|
|
if(CONFIG_BT_SMP_LOG_LEVEL_DBG OR CONFIG_BT_KEYS_LOG_LEVEL_DBG OR CONFIG_BT_LOG_SNIFFER_INFO)
|
2020-11-19 09:26:34 +01:00
|
|
|
message(WARNING "One of these options are enabled:
|
2022-11-02 14:31:13 +01:00
|
|
|
CONFIG_BT_SMP_LOG_LEVEL_DBG CONFIG_BT_KEYS_LOG_LEVEL_DBG CONFIG_BT_LOG_SNIFFER_INFO.
|
2020-06-15 14:01:46 +02:00
|
|
|
Private security keys such as the LTK will be printed out, do not use in
|
|
|
|
production."
|
|
|
|
)
|
|
|
|
endif()
|
2021-02-02 15:36:53 +01:00
|
|
|
if(CONFIG_BT_FIXED_PASSKEY)
|
|
|
|
message(WARNING "CONFIG_BT_FIXED_PASSKEY is enabled
|
|
|
|
A fixed passkey is easy to deduce during the pairing procedure, do not use in
|
|
|
|
production."
|
|
|
|
)
|
|
|
|
endif()
|
2020-06-15 14:01:46 +02:00
|
|
|
if(CONFIG_BT_OOB_DATA_FIXED)
|
|
|
|
message(WARNING "CONFIG_BT_OOB_DATA_FIXED is enabled.
|
|
|
|
A hardcoded OOB data set will be stored in the image, do not use in
|
|
|
|
production."
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
if(CONFIG_BT_USE_DEBUG_KEYS OR CONFIG_BT_STORE_DEBUG_KEYS)
|
|
|
|
message(WARNING "One or both these options are enabled:
|
|
|
|
CONFIG_BT_USE_DEBUG_KEYS CONFIG_BT_STORE_DEBUG_KEYS.
|
|
|
|
A predefined, publicly available keypair intended for testing will be used.
|
|
|
|
Do not use in production."
|
|
|
|
)
|
|
|
|
endif()
|
2020-07-10 10:46:41 -07:00
|
|
|
if(CONFIG_BT_CONN_DISABLE_SECURITY)
|
|
|
|
message(WARNING "CONFIG_BT_CONN_DISABLE_SECURITY is enabled.
|
|
|
|
Security is disabled for incoming requests for GATT attributes and L2CAP
|
|
|
|
channels that would otherwise require encryption/authentication in order to
|
|
|
|
be accessed.
|
|
|
|
Do not use in production."
|
|
|
|
)
|
|
|
|
endif()
|
2023-10-12 14:29:00 +02:00
|
|
|
|
2024-06-04 13:47:34 +02:00
|
|
|
if(CONFIG_BT_USE_PSA_API)
|
|
|
|
zephyr_library_link_libraries_ifdef(CONFIG_MBEDTLS mbedTLS)
|
|
|
|
zephyr_library_include_directories_ifdef(CONFIG_BUILD_WITH_TFM
|
|
|
|
$<TARGET_PROPERTY:tfm,TFM_BINARY_DIR>/api_ns/interface/include
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
2023-10-12 14:29:00 +02:00
|
|
|
# Bluetooth Mesh has test dependencies in the host.
|
|
|
|
# In order to compile Bsim tests with these test features
|
|
|
|
# and PSA enabled, the libraries must be linked.
|
|
|
|
if(CONFIG_BT_MESH AND CONFIG_BT_TESTING)
|
|
|
|
zephyr_library_link_libraries_ifdef(CONFIG_MBEDTLS mbedTLS)
|
|
|
|
endif()
|