Split the `kernel_service.c` into multiple subcommand files, each file would register with the main `kernel` cmd based on the dependencies in Kconfig/CMakeLists.txt. This greatly reduces the number of precompiler directives. Signed-off-by: Yong Cong Sin <ycsin@meta.com> Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
19 lines
299 B
CMake
19 lines
299 B
CMake
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
add_subdirectory_ifdef(CONFIG_KERNEL_SHELL
|
|
kernel_service
|
|
)
|
|
|
|
zephyr_sources_ifdef(
|
|
CONFIG_DEVICE_SHELL
|
|
device_service.c
|
|
)
|
|
zephyr_sources_ifdef(
|
|
CONFIG_DATE_SHELL
|
|
date_service.c
|
|
)
|
|
zephyr_sources_ifdef(
|
|
CONFIG_DEVMEM_SHELL
|
|
devmem_service.c
|
|
)
|