1# SPDX-License-Identifier: Apache-2.0
2
3zephyr_library()
4zephyr_library_compile_definitions(NO_POSIX_CHEATS)
5zephyr_library_sources(
6	cpuhalt.c
7	fatal.c
8	irq.c
9	swap.c
10	thread.c
11	)
12
13if(CONFIG_ARCH_POSIX_TRAP_ON_FATAL)
14  if(CONFIG_NATIVE_LIBRARY)
15    target_sources(native_simulator INTERFACE fatal_trap.c)
16  else()
17    zephyr_library_sources(fatal_trap.c)
18  endif()
19endif()
20
21if(CONFIG_NATIVE_APPLICATION)
22	zephyr_include_directories(
23		nsi_compat/
24	)
25	zephyr_library_sources(
26		posix_core.c
27		nsi_compat/nsi_compat.c
28		${ZEPHYR_BASE}/scripts/native_simulator/common/src/nce.c
29		${ZEPHYR_BASE}/scripts/native_simulator/common/src/nsi_host_trampolines.c
30	)
31else()
32	zephyr_library_sources(
33		posix_core_nsi.c
34	)
35endif()
36