1
0
mirror of https://github.com/olofk/serv.git synced 2026-01-17 00:22:26 +00:00
olofk.serv/sw/Makefile
2021-06-28 09:10:04 +02:00

12 lines
285 B
Makefile

TOOLCHAIN_PREFIX=riscv64-unknown-elf-
%.elf: %.S link.ld
$(TOOLCHAIN_PREFIX)gcc -nostartfiles -nostdlib -march=rv32i -mabi=ilp32 -Tlink.ld -o$@ $<
%.bin: %.elf
$(TOOLCHAIN_PREFIX)objcopy -O binary $< $@
%.hex: %.bin
python3 makehex.py $< 2048 > $@
clean:
rm -f *.elf *.bin *.hex