Fix error introduced by pull request: https://github.com/zephyrproject-rtos/zephyr/pull/31591 Zephyrs CMake extension function zephyr_library_sources_ifdef() does not allow to use complex conditions to toggle if sources should be included in build or not. It allows to use only single variable as an input for feature_toggle argument because it is double-expanded in contition statement in the function. In case there is a requirement that source file is included when more complicated condition is true we have to fall-back to reqular if() statement and zephyr_library_sources(). The fix is required because without it radio_df.c source is never compiled. If DF functionality is enabled build will fail because of missing functions implementation. Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
84 lines
1.9 KiB
CMake
84 lines
1.9 KiB
CMake
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
if(CONFIG_BT_LL_SW_SPLIT)
|
|
zephyr_library_sources(
|
|
ll_sw/nordic/lll/lll.c
|
|
ll_sw/nordic/lll/lll_clock.c
|
|
)
|
|
if(CONFIG_BT_BROADCASTER)
|
|
zephyr_library_sources(
|
|
ll_sw/nordic/lll/lll_adv.c
|
|
)
|
|
zephyr_library_sources_ifdef(
|
|
CONFIG_BT_CTLR_ADV_EXT
|
|
ll_sw/nordic/lll/lll_adv_aux.c
|
|
)
|
|
zephyr_library_sources_ifdef(
|
|
CONFIG_BT_CTLR_ADV_PERIODIC
|
|
ll_sw/nordic/lll/lll_adv_sync.c
|
|
)
|
|
endif()
|
|
if(CONFIG_BT_OBSERVER)
|
|
zephyr_library_sources(
|
|
ll_sw/nordic/lll/lll_scan.c
|
|
)
|
|
zephyr_library_sources_ifdef(
|
|
CONFIG_BT_CTLR_ADV_EXT
|
|
ll_sw/nordic/lll/lll_scan_aux.c
|
|
)
|
|
zephyr_library_sources_ifdef(
|
|
CONFIG_BT_CTLR_SYNC_PERIODIC
|
|
ll_sw/nordic/lll/lll_sync.c
|
|
)
|
|
endif()
|
|
if(CONFIG_BT_CONN)
|
|
zephyr_library_sources(
|
|
ll_sw/nordic/lll/lll_conn.c
|
|
)
|
|
zephyr_library_sources_ifdef(
|
|
CONFIG_BT_PERIPHERAL
|
|
ll_sw/nordic/lll/lll_slave.c
|
|
)
|
|
zephyr_library_sources_ifdef(
|
|
CONFIG_BT_CENTRAL
|
|
ll_sw/nordic/lll/lll_master.c
|
|
)
|
|
endif()
|
|
zephyr_library_sources_ifdef(
|
|
CONFIG_BT_CTLR_DTM
|
|
ll_sw/nordic/lll/lll_test.c
|
|
)
|
|
zephyr_library_sources_ifdef(
|
|
CONFIG_BT_CTLR_PROFILE_ISR
|
|
ll_sw/nordic/lll/lll_prof.c
|
|
)
|
|
zephyr_library_sources_ifdef(
|
|
CONFIG_BT_CTLR_DF
|
|
ll_sw/nordic/lll/lll_df.c
|
|
)
|
|
if(CONFIG_BT_CTLR_DF AND NOT CONFIG_SOC_SERIES_BSIM_NRFXX)
|
|
zephyr_library_sources(ll_sw/nordic/hal/nrf5/radio/radio_df.c)
|
|
endif()
|
|
zephyr_library_include_directories(
|
|
ll_sw/nordic/lll
|
|
)
|
|
endif()
|
|
|
|
zephyr_library_sources(
|
|
ll_sw/nordic/hal/nrf5/cntr.c
|
|
ll_sw/nordic/hal/nrf5/ecb.c
|
|
ll_sw/nordic/hal/nrf5/radio/radio.c
|
|
ll_sw/nordic/hal/nrf5/mayfly.c
|
|
ll_sw/nordic/hal/nrf5/ticker.c
|
|
)
|
|
|
|
zephyr_library_sources_ifdef(
|
|
CONFIG_SOC_FAMILY_NRF
|
|
hci/nordic/hci_vendor.c
|
|
)
|
|
|
|
zephyr_library_include_directories(
|
|
ll_sw/nordic
|
|
hci/nordic
|
|
)
|