AS=riscv64-unknown-elf-as LD=riscv64-unknown-elf-ld all: calc.elf hello.elf: hello.o $(LD) -m elf32lriscv $^ -o $@ calc.elf: calc.o $(LD) -m elf32lriscv -T link.ld $^ -o $@ %.o : %.s $(AS) -mabi=ilp32e -march=rv32ec $< -o $@