1# SPDX-License-Identifier: Apache-2.0
2
3zephyr_library()
4zephyr_library_link_libraries(subsys__bluetooth)
5
6zephyr_library_sources(
7  lll/lll.c
8  lll/lll_clock.c
9  )
10if (CONFIG_BT_BROADCASTER)
11  zephyr_library_sources(
12    lll/lll_adv.c
13    )
14  zephyr_library_sources_ifdef(
15    CONFIG_BT_CTLR_ADV_EXT
16    lll/lll_adv_aux.c
17    )
18  zephyr_library_sources_ifdef(
19    CONFIG_BT_CTLR_ADV_PERIODIC
20    lll/lll_adv_sync.c
21    )
22  zephyr_library_sources_ifdef(
23    CONFIG_BT_CTLR_ADV_ISO
24    lll/lll_adv_iso.c
25    )
26endif()
27if(CONFIG_BT_OBSERVER)
28  zephyr_library_sources(
29    lll/lll_scan.c
30    )
31  zephyr_library_sources_ifdef(
32    CONFIG_BT_CTLR_ADV_EXT
33    lll/lll_scan_aux.c
34    )
35  zephyr_library_sources_ifdef(
36    CONFIG_BT_CTLR_SYNC_PERIODIC
37    lll/lll_sync.c
38    )
39  zephyr_library_sources_ifdef(
40    CONFIG_BT_CTLR_SYNC_ISO
41    lll/lll_sync_iso.c
42    )
43endif()
44if(CONFIG_BT_CONN)
45  zephyr_library_sources(
46    lll/lll_conn.c
47    )
48  zephyr_library_sources_ifdef(
49    CONFIG_BT_PERIPHERAL
50    lll/lll_peripheral.c
51    )
52  zephyr_library_sources_ifdef(
53    CONFIG_BT_CENTRAL
54    lll/lll_central.c
55  )
56endif()
57if(CONFIG_BT_CTLR_CONN_ISO)
58  zephyr_library_sources(
59    lll/lll_conn_iso.c
60    )
61  zephyr_library_sources_ifdef(
62    CONFIG_BT_CTLR_CENTRAL_ISO
63    lll/lll_central_iso.c
64    )
65  zephyr_library_sources_ifdef(
66    CONFIG_BT_CTLR_PERIPHERAL_ISO
67    lll/lll_peripheral_iso.c
68    )
69endif()
70zephyr_library_sources_ifdef(
71  CONFIG_BT_CTLR_DF
72  lll/lll_df.c
73)
74zephyr_library_sources_ifdef(
75  CONFIG_BT_CTLR_DTM
76  lll/lll_test.c
77)
78zephyr_library_sources_ifdef(
79  CONFIG_BT_CTLR_PROFILE_ISR
80  lll/lll_prof.c
81)
82
83zephyr_library_sources_ifdef(
84  CONFIG_BT_CTLR_ISO_VENDOR_DATA_PATH
85  ull/ull_iso_vendor.c
86  )
87
88zephyr_library_sources(
89  hci/hci_vendor.c
90  )
91
92zephyr_library_sources(
93  hal/nrf5/cntr.c
94  hal/nrf5/radio/radio.c
95  hal/nrf5/mayfly.c
96  hal/nrf5/ticker.c
97  )
98
99zephyr_library_sources_ifdef(
100  CONFIG_BT_CTLR_CRYPTO
101  hal/nrf5/ecb.c
102  )
103
104if(CONFIG_BT_CTLR_DF AND NOT CONFIG_SOC_SERIES_BSIM_NRFXX)
105  zephyr_library_sources(
106    hal/nrf5/radio/radio_df.c
107    )
108endif()
109
110zephyr_library_include_directories(
111  .
112  ../../../controller
113  ../../../controller/ll_sw
114  ../../../controller/include
115  )
116
117# This path needs to be added globally as it is supposed to be used
118# in nrfx_glue.h when other libraries are built.
119zephyr_include_directories(
120  hal/nrf5/nrfx_glue
121  )
122
123zephyr_library_compile_options_ifdef(
124  CONFIG_BT_CTLR_OPTIMIZE_FOR_SPEED
125  ${OPTIMIZE_FOR_SPEED_FLAG}
126  )
127