6 lines
700 B
Makefile
6 lines
700 B
Makefile
example: example.c Makefile boot.s linker.ld printf.h printf.c putchar.c
|
|
riscv32-none-elf-as -march=rv32i -mabi=ilp32 boot.s -o boot.o
|
|
riscv32-none-elf-gcc -fno-builtin -fvisibility=hidden -nostdlib -nostartfiles -march=rv32im -mabi=ilp32 -D PRINTF_DISABLE_SUPPORT_FLOAT=1 -D PRINTF_DISABLE_SUPPORT_LONG_LONG=1 -c printf.c -o printf.o -g
|
|
riscv32-none-elf-gcc -fno-builtin -fvisibility=hidden -nostdlib -nostartfiles -march=rv32im -mabi=ilp32 -c putchar.c -o putchar.o -g
|
|
riscv32-none-elf-gcc -fno-builtin -fvisibility=hidden -nostdlib -nostartfiles -march=rv32im -mabi=ilp32 -c example.c -o example.o -g -O2
|
|
riscv32-none-elf-ld boot.o example.o printf.o putchar.o -T linker.ld -o example -g -O2
|