build: init cmake build system for am
This commit is contained in:
parent
18db852763
commit
da0c42422d
22 changed files with 515 additions and 30 deletions
26
abstract-machine/am/src/native/CMakeLists.txt
Normal file
26
abstract-machine/am/src/native/CMakeLists.txt
Normal file
|
@ -0,0 +1,26 @@
|
|||
include(CheckPIESupported)
|
||||
check_pie_supported()
|
||||
|
||||
set(SOURCES
|
||||
trap.S
|
||||
cte.c
|
||||
ioe.c
|
||||
mpe.c
|
||||
platform.c
|
||||
trm.c
|
||||
vme.c
|
||||
ioe/audio.c
|
||||
ioe/disk.c
|
||||
ioe/gpu.c
|
||||
ioe/input.c
|
||||
ioe/timer.c
|
||||
)
|
||||
add_library(am-native ${SOURCES})
|
||||
|
||||
# FIXME: get free(): invalid address when user program compiled without pie
|
||||
set_target_properties(am-native PROPERTIES
|
||||
POSITION_INDEPENDENT_CODE TRUE
|
||||
INTERFACE_POSITION_INDEPENDENT_CODE TRUE)
|
||||
|
||||
find_package(SDL2 REQUIRED)
|
||||
target_link_libraries(am-${ARCH} PUBLIC SDL2::SDL2)
|
Loading…
Add table
Add a link
Reference in a new issue