added C-extension support
This commit is contained in:
@@ -2,21 +2,21 @@ CC = riscv64-linux-gnu-gcc
|
||||
OBJCOPY = riscv64-linux-gnu-objcopy
|
||||
EMULATOR = ./amach
|
||||
|
||||
ASFLAGS = -march=rv32ima -mabi=ilp32 -nostdlib -s -static -fno-pic -fno-pie -mno-relax
|
||||
ASFLAGS = -march=rv32imac -mabi=ilp32 -nostdlib -s -static -fno-pic -fno-pie -mno-relax
|
||||
LDFLAGS = -Wl,-Ttext=0x100b0 -Wl,--build-id=none
|
||||
|
||||
all: rv32ima_tests.bin
|
||||
all: rv32imac_tests.bin
|
||||
|
||||
rv32ima_tests.elf: rv32ima_tests.s
|
||||
$(CC) $(ASFLAGS) $(LDFLAGS) rv32ima_tests.s -o rv32ima_tests.elf
|
||||
rv32imac_tests.elf: rv32imac_tests.s
|
||||
$(CC) $(ASFLAGS) $(LDFLAGS) rv32imac_tests.s -o rv32imac_tests.elf
|
||||
|
||||
rv32ima_tests.bin: rv32ima_tests.elf
|
||||
$(OBJCOPY) -O binary rv32ima_tests.elf rv32ima_tests.bin
|
||||
rv32imac_tests.bin: rv32imac_tests.elf
|
||||
$(OBJCOPY) -O binary rv32imac_tests.elf rv32imac_tests.bin
|
||||
|
||||
run: rv32ima_tests.bin
|
||||
$(EMULATOR) rv32ima_tests.bin
|
||||
run: rv32imac_tests.bin
|
||||
$(EMULATOR) rv32imac_tests.bin
|
||||
|
||||
clean:
|
||||
rm -f rv32ima_tests.elf rv32ima_tests.bin
|
||||
rm -f rv32imac_tests.elf rv32imac_tests.bin
|
||||
|
||||
.PHONY: all run clean
|
||||
|
||||
Reference in New Issue
Block a user