project(libwrap) message(STATUS " here 2 in libwrap") # Create object library for libwrap set(LIB_SOURCES sys/_exit.c sys/close.c sys/execve.c sys/fork.c sys/fstat.c sys/getpid.c sys/isatty.c sys/kill.c sys/link.c sys/lseek.c sys/open.c sys/openat.c sys/printf.c sys/puts.c sys/read.c sys/sbrk.c sys/stat.c sys/times.c sys/unlink.c sys/wait.c sys/write.c # Standard library stdlib/malloc.c # Miscellaneous misc/write_hex.c ) if(SEMIHOSTING) list(APPEND LIB_SOURCES semihosting/semihosting.c semihosting/trap.c ) endif() add_library(${PROJECT_NAME} OBJECT ${LIB_SOURCES}) # Include directories target_include_directories(${PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} ${BSP_BASE}/include include/ ${BSP_BASE}/env ${BSP_BASE}/env/${BOARD} ${BSP_BASE}/drivers ) # Compile options #link global_compile_options to this libraries target_link_libraries(${PROJECT_NAME} PRIVATE global_compile_options) # Compile definitions #target_compile_definitions(libwrap_objects PRIVATE # BOARD_${BOARD} #) # Export objects to parent scope set(LIBWRAP_OBJECTS $ PARENT_SCOPE)