diff --git a/ferrocyanide/raspi-xargo/Makefile b/ferrocyanide/raspi-xargo/Makefile index e9e507e..d011ebf 100644 --- a/ferrocyanide/raspi-xargo/Makefile +++ b/ferrocyanide/raspi-xargo/Makefile @@ -18,12 +18,16 @@ rust_loader.o: rust_loader.s #rust_kernel.o: rust_kernel.rs # rustc --target ./arm-none-eabihf.json --emit=obj -Cpanic=abort -C lto rust_kernel.rs -xargo_step: src/lib.rs +rust_kernel.o: src/lib.rs ~/.cargo/bin/xargo build kernel.elf: rust_kernel.o rust_loader.o - arm-none-eabi-gcc -T rust_linker_script.ld -o kernel.elf -ffreestanding -nostdlib rust_loader.o target/arm-none-eabihf/debug/libraspi_xargo.rlib + arm-none-eabi-gcc -T rust_linker_script.ld -o rust_kernel.elf -ffreestanding -nostdlib rust_loader.o target/arm-none-eabihf/debug/libraspi_xargo.rlib +kernel: kernel.elf + arm-none-eabi-objcopy rust_kernel.elf -O binary kernel.img + +.PHONY: clean clean: rm -f *.o rm -f *.elf