mirror of
https://github.com/isometimes/rpi4-osdev
synced 2024-11-08 19:30:39 +00:00
Added windows Makefile for part8 to test cross-compile
This commit is contained in:
parent
dba37c8522
commit
fa83c4ff5e
1 changed files with 22 additions and 0 deletions
22
part8-breakout-ble/Makefile.gcc.windows
Normal file
22
part8-breakout-ble/Makefile.gcc.windows
Normal file
|
@ -0,0 +1,22 @@
|
|||
CFILES = $(wildcard *.c)
|
||||
OFILES = $(CFILES:.c=.o)
|
||||
GCCFLAGS = -Wall -O0 -ffreestanding -nostdinc -nostdlib -nostartfiles
|
||||
GCCPATH = ..\..\gcc-arm-10.2-2020.11-mingw-w64-i686-aarch64-none-elf\bin
|
||||
|
||||
all: clean kernel8.img
|
||||
|
||||
boot.o: boot.S
|
||||
$(GCCPATH)\aarch64-none-elf-gcc $(GCCFLAGS) -c boot.S -o boot.o
|
||||
|
||||
BCM4345C0.o : BCM4345C0.hcd
|
||||
$(GCCPATH)\aarch64-none-elf-objcopy -I binary -O elf64-littleaarch64 -B aarch64 $< $@
|
||||
|
||||
%.o: %.c
|
||||
$(GCCPATH)\aarch64-none-elf-gcc $(GCCFLAGS) -c $< -o $@
|
||||
|
||||
kernel8.img: boot.o $(OFILES) BCM4345C0.o
|
||||
$(GCCPATH)\aarch64-none-elf-ld -nostdlib -nostartfiles boot.o $(OFILES) BCM4345C0.o -T link.ld -o kernel8.elf
|
||||
$(GCCPATH)\aarch64-none-elf-objcopy -O binary kernel8.elf kernel8.img
|
||||
|
||||
clean:
|
||||
del kernel8.elf *.o *.img
|
Loading…
Reference in a new issue