Files
raspberrypi/blinker01/Makefile
2012-05-26 01:27:30 -04:00

31 lines
546 B
Makefile

ARMGNU ?= arm-none-eabi
COPS = -Wall -O2 -nostdlib -nostartfiles -ffreestanding
all : kernel.img
clean :
rm -f *.o
rm -f *.bin
rm -f *.elf
rm -f *.list
rm -f *.img
novectors.o : novectors.s
$(ARMGNU)-as novectors.s -o novectors.o
blinker01.o : blinker01.c
$(ARMGNU)-gcc $(COPS) -c blinker01.c -o blinker01.o
kernel.img : memmap novectors.o blinker01.o
$(ARMGNU)-ld novectors.o blinker01.o -T memmap -o blinker01.elf
$(ARMGNU)-objdump -D blinker01.elf > blinker01.list
$(ARMGNU)-objcopy blinker01.elf -O binary kernel.img