2019-04-06 21:08:09 +08:00
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
2017-12-21 21:14:19 +08:00
|
|
|
zephyr_library()
|
2018-09-15 01:43:44 +08:00
|
|
|
zephyr_library_compile_definitions(NO_POSIX_CHEATS)
|
2017-12-21 21:14:19 +08:00
|
|
|
zephyr_library_sources(
|
|
|
|
hw_models_top.c
|
|
|
|
timer_model.c
|
2018-07-15 22:22:45 +08:00
|
|
|
native_rtc.c
|
2017-12-21 21:14:19 +08:00
|
|
|
irq_handler.c
|
|
|
|
irq_ctrl.c
|
|
|
|
main.c
|
|
|
|
tracing.c
|
2018-02-11 23:30:49 +08:00
|
|
|
cmdline_common.c
|
2018-01-09 21:20:49 +08:00
|
|
|
cmdline.c
|
2017-12-21 21:14:19 +08:00
|
|
|
)
|
2018-06-21 18:51:29 +08:00
|
|
|
|
2018-10-17 03:35:06 +08:00
|
|
|
if(CONFIG_HAS_SDL)
|
|
|
|
find_package(PkgConfig REQUIRED)
|
|
|
|
pkg_search_module(SDL2 REQUIRED sdl2)
|
|
|
|
zephyr_include_directories(${SDL2_INCLUDE_DIRS})
|
|
|
|
zephyr_link_libraries(${SDL2_LIBRARIES})
|
|
|
|
zephyr_compile_options(${SDL2_CFLAGS_OTHER})
|
|
|
|
zephyr_library_sources(sdl_events.c)
|
|
|
|
endif()
|
|
|
|
|
2018-06-21 18:51:29 +08:00
|
|
|
zephyr_ld_options(
|
|
|
|
-lm
|
|
|
|
)
|
2018-07-05 16:52:26 +08:00
|
|
|
|
|
|
|
# Override the C standard used for compilation to C 2011
|
|
|
|
# This is due to some tests using _Static_assert which is a 2011 feature, but
|
|
|
|
# otherwise relying on compilers supporting it also when set to C99.
|
|
|
|
# This was in general ok, but with some host compilers and C library versions
|
|
|
|
# it led to problems. So we override it to 2011 for native_posix.
|
|
|
|
set_property(GLOBAL PROPERTY CSTD c11)
|