1# 2# Copyright (c) 2018-2021 mcumgr authors 3# Copyright (c) 2022-2023 Nordic Semiconductor ASA 4# 5# SPDX-License-Identifier: Apache-2.0 6# 7 8# OS Management group public API is exposed through zephyr_interface, 9# when OS Management is enabled. 10zephyr_library(mgmt_mcumgr_grp_os) 11zephyr_library_sources(src/os_mgmt.c) 12 13zephyr_library_include_directories(include) 14 15if (CONFIG_MCUMGR_GRP_OS_BOOTLOADER_INFO) 16 zephyr_include_directories( 17 ${ZEPHYR_MCUBOOT_MODULE_DIR}/boot/bootutil/include 18 ) 19endif() 20 21if(DEFINED CONFIG_MCUMGR_GRP_OS_INFO_BUILD_DATE_TIME) 22 set(MCUMGR_GRP_OS_INFO_BUILD_DATE_TIME_DIR ${PROJECT_BINARY_DIR}/os_mgmt_auto) 23 file(MAKE_DIRECTORY ${MCUMGR_GRP_OS_INFO_BUILD_DATE_TIME_DIR}) 24 file(WRITE ${MCUMGR_GRP_OS_INFO_BUILD_DATE_TIME_DIR}/os_mgmt_build_date.c "/* Auto generated file, do not edit */\n#include <stdint.h>\nuint8_t *MCUMGR_GRP_OS_INFO_BUILD_DATE_TIME = __TIMESTAMP__;") 25 zephyr_library_sources(${MCUMGR_GRP_OS_INFO_BUILD_DATE_TIME_DIR}/os_mgmt_build_date.c) 26endif() 27