zephyr/subsys/bluetooth/controller/CMakeLists.txt
Alex Porosanu 3412612085 bluetooth: controller: refactor CMake related files
Zephyr aims to enable supporting of multiple SW defined
BLE LL. There is a complex hierarchy of defines in the
CMake files controlling the compilation units that part of
the final library. Adding another SW LL implementation
from a different SoC provider will make the main controller
CMake file unmaintable.
As such, split the into vendor-specific CMake files for
easier additions.

Signed-off-by: Alex Porosanu <alexandru.porosanu@nxp.com>
2020-01-23 16:08:00 +01:00

92 lines
1.7 KiB
CMake

# SPDX-License-Identifier: Apache-2.0
zephyr_library()
zephyr_library_sources(
util/mem.c
util/memq.c
util/mayfly.c
util/util.c
ticker/ticker.c
ll_sw/ll_addr.c
ll_sw/ll_tx_pwr.c
hci/hci_driver.c
hci/hci.c
)
zephyr_library_sources_ifdef(
CONFIG_BT_CTLR_CRYPTO
crypto/crypto.c
)
if(CONFIG_BT_LL_SW_SPLIT)
zephyr_library_sources(
ll_sw/ull.c
ll_sw/lll_chan.c
)
if(CONFIG_BT_BROADCASTER)
zephyr_library_sources(
ll_sw/ull_adv.c
)
zephyr_library_sources_ifdef(
CONFIG_BT_CTLR_ADV_EXT
ll_sw/ull_adv_aux.c
)
endif()
if(CONFIG_BT_OBSERVER)
zephyr_library_sources(
ll_sw/ull_scan.c
)
endif()
if(CONFIG_BT_CONN)
zephyr_library_sources(
ll_sw/ull_conn.c
)
if(CONFIG_BT_PERIPHERAL)
zephyr_library_sources(
ll_sw/ull_slave.c
)
endif()
if(CONFIG_BT_CENTRAL)
zephyr_library_sources(
ll_sw/ull_master.c
)
endif()
if(CONFIG_BT_CTLR_SCHED_ADVANCED)
zephyr_library_sources(
ll_sw/ull_sched.c
)
endif()
endif()
zephyr_library_sources_ifdef(
CONFIG_BT_CTLR_FILTER
ll_sw/ull_filter.c
)
zephyr_library_sources_ifdef(
CONFIG_BT_HCI_MESH_EXT
ll_sw/ll_mesh.c
)
endif()
if(CONFIG_SOC_COMPATIBLE_NRF)
include(ll_sw/nrf.cmake)
elseif(CONFIG_SOC_OPENISA_RV32M1_RISCV32)
include(ll_sw/openisa.cmake)
endif()
zephyr_library_sources_ifdef(
CONFIG_BT_CTLR_SETTINGS
ll_sw/ll_settings.c
)
zephyr_library_include_directories(
.
include
ll_sw
)
zephyr_library_compile_options_ifdef(
CONFIG_BT_CTLR_FAST_ENC
${OPTIMIZE_FOR_SPEED_FLAG}
)
zephyr_library_link_libraries(subsys__bluetooth)