24 lines
788 B
Makefile
24 lines
788 B
Makefile
|
|
all: process
|
|
|
|
process:
|
|
arm-none-eabi-as -I asm -o main.o main.s
|
|
arm-none-eabi-ld --no-undefined main.o -Map kernel.map -o output.elf -T kernel.ld
|
|
arm-none-eabi-objcopy output.elf -O binary kernel.img
|
|
|
|
#arm-none-eabi-ld --no-undefined rust_kernel.o -Map kernel.map -o rust_kernel.elf -T kernel.ld
|
|
rust_kernel: rust_kernel.rs
|
|
rustc --target arm-unknown-linux-gnueabihf --emit=obj rust_kernel.rs
|
|
arm-none-eabi-gcc -mfpu=vfp -mfloat-abi=hard -march=armv6zk -mtune=arm1176jzf-s -nostartfiles rust_kernel.o -o rust_kernel.elf
|
|
arm-none-eabi-objcopy rust_kernel.elf -O binary kernel.img
|
|
|
|
rust_loader.o: rust_loader.s
|
|
arm-none-eabi-gcc -mcpu=arm1176jzf-s -fpic -ffreestanding -c rust_loader.s -o rust_loader.o
|
|
|
|
clean:
|
|
rm -f *.o
|
|
rm -f *.elf
|
|
rm -f *.a
|
|
rm -f kernel.img
|
|
rm -f kernel.map
|