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
34
abstract-machine/am/src/riscv/nemu/CMakeLists.txt
Normal file
34
abstract-machine/am/src/riscv/nemu/CMakeLists.txt
Normal file
|
@ -0,0 +1,34 @@
|
|||
include(nemu-settings)
|
||||
include(riscv-settings)
|
||||
|
||||
add_library(am-${ISA}-nemu
|
||||
cte.c
|
||||
start.S
|
||||
trap.S
|
||||
vme.c
|
||||
${NEMU_SOURCES}
|
||||
)
|
||||
|
||||
target_compile_options(am-${ISA}-nemu PRIVATE
|
||||
${NEMU_COMPILE_OPTIONS}
|
||||
${RISCV_COMPILE_OPTIONS})
|
||||
target_link_options(am-${ISA}-nemu PRIVATE
|
||||
${NEMU_LINK_OPITIONS}
|
||||
${RISCV_LINK_OPTIONS})
|
||||
target_include_directories(am-${ISA}-nemu PRIVATE
|
||||
${NEMU_INCLUDE_DIRECTORIES})
|
||||
target_link_options(am-${ISA}-nemu INTERFACE
|
||||
LINKER:--defsym=_pmem_start=0x80000000
|
||||
LINKER:--defsym=_entry_offset=0x0
|
||||
LINKER:--gc-sections
|
||||
LINKER:-e _start
|
||||
-nostartfiles)
|
||||
|
||||
target_compile_definitions(am-${ISA}-nemu PUBLIC
|
||||
ARCH_H="arch/riscv.h")
|
||||
target_compile_definitions(am-${ISA}-nemu PRIVATE
|
||||
ISA_H="riscv/riscv.h")
|
||||
|
||||
set_target_properties(am-${ISA}-nemu PROPERTIES
|
||||
POSITION_INDEPENDENT_CODE OFF
|
||||
INTERFACE_POSITION_INDEPENDENT_CODE OFF)
|
Loading…
Add table
Add a link
Reference in a new issue