1# SPDX-License-Identifier: Apache-2.0
2
3zephyr_system_include_directories(include)
4
5zephyr_library()
6zephyr_library_property(ALLOW_EMPTY TRUE)
7zephyr_library_sources_ifdef(CONFIG_COMMON_LIBC_ABORT source/stdlib/abort.c)
8zephyr_library_sources_ifdef(CONFIG_COMMON_LIBC_ASCTIME source/time/asctime.c)
9zephyr_library_sources_ifdef(CONFIG_COMMON_LIBC_GMTIME_R source/time/gmtime_r.c)
10zephyr_library_sources_ifdef(CONFIG_COMMON_LIBC_LOCALTIME_R_UTC source/time/localtime_r_utc.c)
11zephyr_library_sources_ifdef(CONFIG_COMMON_LIBC_CTIME source/time/ctime.c)
12zephyr_library_sources_ifdef(CONFIG_COMMON_LIBC_TIME source/time/time.c)
13zephyr_library_sources_ifdef(CONFIG_COMMON_LIBC_MALLOC source/stdlib/malloc.c)
14zephyr_library_sources_ifdef(CONFIG_COMMON_LIBC_STRNLEN source/string/strnlen.c)
15zephyr_library_sources_ifdef(CONFIG_COMMON_LIBC_THRD
16    source/thrd/cnd.c
17    source/thrd/mtx.c
18    source/thrd/once.c
19    source/thrd/thrd.c
20    source/thrd/tss.c
21    )
22zephyr_library_sources_ifdef(CONFIG_COMMON_LIBC_REMOVE source/stdio/remove.c)
23
24# Prevent compiler from optimizing calloc into an infinite recursive call
25zephyr_library_compile_options($<TARGET_PROPERTY:compiler,no_builtin_malloc>)
26