CMakeLists.txt 1.3 KB

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