1# SPDX-License-Identifier: Apache-2.0 2 3 4zephyr_interface_library_named(posix_subsys) 5 6if(CONFIG_POSIX_API) 7 target_include_directories(posix_subsys INTERFACE ${ZEPHYR_BASE}/include/posix) 8endif() 9 10zephyr_library() 11zephyr_library_sources(pthread_common.c) 12zephyr_library_sources_ifdef(CONFIG_PTHREAD_IPC pthread_cond.c) 13zephyr_library_sources_ifdef(CONFIG_PTHREAD_IPC pthread_mutex.c) 14zephyr_library_sources_ifdef(CONFIG_PTHREAD_IPC pthread_barrier.c) 15zephyr_library_sources_ifdef(CONFIG_PTHREAD_IPC pthread.c) 16zephyr_library_sources_ifdef(CONFIG_PTHREAD_IPC pthread_sched.c) 17zephyr_library_sources_ifdef(CONFIG_POSIX_CLOCK clock.c) 18zephyr_library_sources_ifdef(CONFIG_POSIX_CLOCK sleep.c) 19zephyr_library_sources_ifdef(CONFIG_POSIX_CLOCK timer.c) 20zephyr_library_sources_ifdef(CONFIG_PTHREAD_IPC pthread_rwlock.c) 21zephyr_library_sources_ifdef(CONFIG_PTHREAD_IPC semaphore.c) 22zephyr_library_sources_ifdef(CONFIG_PTHREAD_IPC pthread_key.c) 23zephyr_library_sources_ifdef(CONFIG_POSIX_MQUEUE mqueue.c) 24zephyr_library_sources_ifdef(CONFIG_POSIX_FS fs.c) 25zephyr_library_sources_ifdef(CONFIG_EVENTFD eventfd.c) 26 27if(NOT (CONFIG_BOARD_NATIVE_POSIX OR CONFIG_BOARD_NATIVE_POSIX_64BIT)) 28zephyr_library_sources(nanosleep.c) 29endif() 30 31zephyr_library_include_directories( 32 ${ZEPHYR_BASE}/kernel/include 33 ${ARCH_DIR}/${ARCH}/include 34) 35 36zephyr_library_link_libraries(posix_subsys) 37