diff --git a/misc/CMakeLists.txt b/misc/CMakeLists.txt index e5b1a45fd37..fceffd48083 100644 --- a/misc/CMakeLists.txt +++ b/misc/CMakeLists.txt @@ -1,2 +1 @@ zephyr_sources_if_kconfig(printk.c) -zephyr_sources_if_kconfig(reboot.c) diff --git a/subsys/CMakeLists.txt b/subsys/CMakeLists.txt index 8e7f13f628b..c4af21ff33a 100644 --- a/subsys/CMakeLists.txt +++ b/subsys/CMakeLists.txt @@ -14,6 +14,6 @@ add_subdirectory_ifdef(CONFIG_USB usb) add_subdirectory(random) add_subdirectory(storage) add_subdirectory_ifdef(CONFIG_SETTINGS settings) -add_subdirectory_ifdef(CONFIG_PM_CONTROL_OS power) add_subdirectory(fb) +add_subdirectory(power) add_subdirectory(stats) diff --git a/subsys/power/CMakeLists.txt b/subsys/power/CMakeLists.txt index df7e50549f8..e9fda2e18fd 100644 --- a/subsys/power/CMakeLists.txt +++ b/subsys/power/CMakeLists.txt @@ -1,6 +1,7 @@ -zephyr_sources( +zephyr_sources_ifdef(CONFIG_PM_CONTROL_OS power.c device.c ) zephyr_sources_ifdef(CONFIG_PM_CONTROL_STATE_LOCK pm_ctrl.c) -add_subdirectory(policy) +add_subdirectory_ifdef(CONFIG_PM_CONTROL_OS policy) +zephyr_sources_if_kconfig(reboot.c) diff --git a/misc/reboot.c b/subsys/power/reboot.c similarity index 100% rename from misc/reboot.c rename to subsys/power/reboot.c