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