1# SPDX-License-Identifier: Apache-2.0
2
3zephyr_library()
4zephyr_library_link_libraries(subsys__bluetooth)
5
6zephyr_library_sources_ifdef(CONFIG_BT_HCI_RAW          hci_raw.c hci_common.c)
7zephyr_library_sources_ifdef(CONFIG_BT_MONITOR          monitor.c)
8zephyr_library_sources_ifdef(CONFIG_BT_TINYCRYPT_ECC    hci_ecc.c)
9zephyr_library_sources_ifdef(CONFIG_BT_A2DP             a2dp.c)
10zephyr_library_sources_ifdef(CONFIG_BT_AVDTP            avdtp.c)
11zephyr_library_sources_ifdef(CONFIG_BT_RFCOMM           rfcomm.c)
12zephyr_library_sources_ifdef(CONFIG_BT_TESTING          testing.c)
13zephyr_library_sources_ifdef(CONFIG_BT_SETTINGS         settings.c)
14zephyr_library_sources_ifdef(CONFIG_BT_HOST_CCM         aes_ccm.c)
15zephyr_library_sources_ifdef(CONFIG_BT_LONG_WQ          long_wq.c)
16
17zephyr_library_sources_ifdef(
18  CONFIG_BT_BREDR
19  br.c
20  keys_br.c
21  l2cap_br.c
22  sdp.c
23  ssp.c
24  )
25
26zephyr_library_sources_ifdef(
27  CONFIG_BT_HFP_HF
28  hfp_hf.c
29  at.c
30  )
31
32if(CONFIG_BT_HCI_HOST)
33  zephyr_library_sources(
34    uuid.c
35    addr.c
36    buf.c
37    data.c
38    hci_core.c
39    hci_common.c
40    id.c
41    )
42  zephyr_library_sources_ifdef(
43    CONFIG_BT_BROADCASTER
44    adv.c
45    )
46  zephyr_library_sources_ifdef(
47    CONFIG_BT_OBSERVER
48    scan.c
49    )
50  zephyr_library_sources_ifdef(
51    CONFIG_BT_HOST_CRYPTO
52    crypto.c
53    )
54  zephyr_library_sources_ifdef(
55    CONFIG_BT_ECC
56    ecc.c
57    )
58
59  if(CONFIG_BT_CONN)
60    zephyr_library_sources(
61      conn.c
62      l2cap.c
63      att.c
64      gatt.c
65      )
66
67    if(CONFIG_BT_SMP)
68      zephyr_library_sources(
69        smp.c
70        keys.c
71        )
72    else()
73      zephyr_library_sources(
74        smp_null.c
75        )
76    endif()
77  endif()
78
79  zephyr_library_sources_ifdef(
80    CONFIG_BT_ISO
81    iso.c
82    conn.c
83    )
84
85  if(CONFIG_BT_DF)
86    zephyr_library_sources(
87      direction.c
88      )
89  endif()
90endif()
91
92if(CONFIG_BT_SMP_LOG_LEVEL_DBG OR CONFIG_BT_KEYS_LOG_LEVEL_DBG OR CONFIG_BT_LOG_SNIFFER_INFO)
93  message(WARNING "One of these options are enabled:
94  CONFIG_BT_SMP_LOG_LEVEL_DBG CONFIG_BT_KEYS_LOG_LEVEL_DBG CONFIG_BT_LOG_SNIFFER_INFO.
95  Private security keys such as the LTK will be printed out, do not use in
96  production."
97    )
98endif()
99if(CONFIG_BT_FIXED_PASSKEY)
100  message(WARNING "CONFIG_BT_FIXED_PASSKEY is enabled
101  A fixed passkey is easy to deduce during the pairing procedure, do not use in
102  production."
103    )
104endif()
105if(CONFIG_BT_OOB_DATA_FIXED)
106  message(WARNING "CONFIG_BT_OOB_DATA_FIXED is enabled.
107  A hardcoded OOB data set will be stored in the image, do not use in
108  production."
109    )
110endif()
111if(CONFIG_BT_USE_DEBUG_KEYS OR CONFIG_BT_STORE_DEBUG_KEYS)
112  message(WARNING "One or both these options are enabled:
113  CONFIG_BT_USE_DEBUG_KEYS CONFIG_BT_STORE_DEBUG_KEYS.
114  A predefined, publicly available keypair intended for testing will be used.
115  Do not use in production."
116    )
117endif()
118if(CONFIG_BT_CONN_DISABLE_SECURITY)
119  message(WARNING "CONFIG_BT_CONN_DISABLE_SECURITY is enabled.
120  Security is disabled for incoming requests for GATT attributes and L2CAP
121  channels that would otherwise require encryption/authentication in order to
122  be accessed.
123  Do not use in production."
124    )
125endif()
126