mirror of
https://github.com/ringtailsoftware/uvm32.git
synced 2026-06-06 06:53:39 +00:00
Move all app common files under apps/common
This commit is contained in:
parent
60f362b819
commit
5bd6a32013
31 changed files with 49 additions and 49 deletions
|
|
@ -1,36 +0,0 @@
|
|||
PREFIX:=riscv64-elf-
|
||||
OPT ?= -Os
|
||||
CFLAGS+=-I${TOPDIR}/common
|
||||
CFLAGS+=${OPT} -fno-stack-protector -fno-builtin-memcpy -fno-builtin
|
||||
CFLAGS+=-static-libgcc -fdata-sections -ffunction-sections
|
||||
CFLAGS+=-g -march=rv32im -mabi=ilp32 -static
|
||||
LDFLAGS:= -T ${TOPDIR}/apps/linker.ld -nostdlib -Wl,--gc-sections
|
||||
LIBS:= -lgcc # needed for softfp
|
||||
|
||||
# check if the compiler is installed
|
||||
UNAME_S := $(shell uname -s)
|
||||
ifeq ($(UNAME_S),Darwin)
|
||||
PREFIX=riscv64-elf-
|
||||
ifeq (,$(shell which ${PREFIX}gcc))
|
||||
$(error "Try brew install riscv64-elf-gcc riscv64-elf-binutils")
|
||||
endif
|
||||
else
|
||||
PREFIX=riscv64-unknown-elf-
|
||||
ifeq (,$(shell which ${PREFIX}gcc))
|
||||
$(error "Try apt-get install gcc-riscv64-unknown-elf")
|
||||
endif
|
||||
endif
|
||||
|
||||
all_common:
|
||||
${PREFIX}gcc -o ${PROJECT}.elf ${CFLAGS} ${LDFLAGS} ${SRCS} ${LIBS}
|
||||
@$(PREFIX)objcopy ${PROJECT}.elf -O binary ${PROJECT}.bin
|
||||
|
||||
disasm_common: all
|
||||
$(PREFIX)objdump -S -d -f ${PROJECT}.elf
|
||||
|
||||
test_common: all
|
||||
${TOPDIR}/hosts/host/host ${HOST_EXTRA} ${PWD}/${PROJECT}.bin
|
||||
|
||||
clean_common:
|
||||
rm -f ${PROJECT}.o ${PROJECT}.elf ${PROJECT}.bin
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue