| # kernel is a normal CMake library and not a zephyr_library because it |
| # should not be --whole-archive'd |
| target_include_directories(kernel PRIVATE ${PROJECT_SOURCE_DIR}/include/posix) |
| target_sources_ifdef(CONFIG_INT_LATENCY_BENCHMARK kernel PRIVATE int_latency_bench.c) |
| target_sources_ifdef(CONFIG_STACK_CANARIES kernel PRIVATE compiler_stack_protect.c) |
| target_sources_ifdef(CONFIG_SYS_CLOCK_EXISTS kernel PRIVATE timer.c) |
| target_sources_ifdef(CONFIG_ATOMIC_OPERATIONS_C kernel PRIVATE atomic_c.c) |
| target_sources_if_kconfig( kernel PRIVATE poll.c) |
| add_subdirectory_ifdef(CONFIG_PTHREAD_IPC posix) |
| # The last 2 files inside the target_sources_ifdef should be |
| # userspace_handler.c and userspace.c. If not the linker would complain. |
| # This order has to be maintained. Any new file should be placed |
| add_dependencies(kernel offsets_h) |
| target_link_libraries(kernel zephyr_interface) |