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
512 B
CMake
19 lines
512 B
CMake
# Copyright (c) 2024 Meta Platforms
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
zephyr_include_directories(../)
|
|
|
|
# Main command
|
|
zephyr_sources_ifdef(CONFIG_KERNEL_THREAD_SHELL thread.c)
|
|
|
|
# Subcommands
|
|
zephyr_sources_ifdef(CONFIG_KERNEL_THREAD_SHELL_LIST list.c)
|
|
|
|
zephyr_sources_ifdef(CONFIG_KERNEL_THREAD_SHELL_MASK mask.c)
|
|
|
|
zephyr_sources_ifdef(CONFIG_KERNEL_THREAD_SHELL_MASK pin.c)
|
|
|
|
zephyr_sources_ifdef(CONFIG_KERNEL_THREAD_SHELL_STACKS stacks.c)
|
|
|
|
zephyr_sources_ifdef(CONFIG_KERNEL_THREAD_SHELL_UNWIND unwind.c)
|