mirror of
https://github.com/olofk/serv.git
synced 2025-04-20 20:07:20 -04:00
11 lines
280 B
Makefile
11 lines
280 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 $< > $@
|
|
|
|
clean:
|
|
rm -f *.elf *.bin *.hex
|