summaryrefslogtreecommitdiff
path: root/Makefile
blob: b10fe7ab86f162f78c2a5e0ef74e1c5aa0d04549 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
SRCS=main.s slow_status_flash.s  flash_button.s swi_handler.s
OBJS=main.o slow_status_flash.o  flash_button.o swi_handler.o

all: kernel.img

kernel.img: kernel.elf
	arm-none-eabi-objcopy kernel.elf -O binary kernel.img

kernel.elf: ${OBJS} linkscript.ld
	arm-none-eabi-ld --no-undefined ${OBJS} -o kernel.elf -T linkscript.ld

%.o: src/%.s
	arm-none-eabi-as -Isrc $< -o $@

clean:
	rm -f ${OBJS} kernel.elf kernel.img