7 TARGET = ${ARCH}-none-elf
12 ASFLAGS = -target ${TARGET}
15 CXXFLAGS = -target ${TARGET} -Wall -Wextra -nostdlib -fno-exceptions
16 CXXFLAGS +=-ffreestanding -mgeneral-regs-only
17 CXXFLAGS +=-Iinclude -std=c++11
18 CXXFILES = kernel.cc uart_${BOARD}.cc
20 OBJS = ${ASFILES:.S=.o} ${CXXFILES:.cc=.o}
22 .PHONY: clean qemu gdb-remote
27 ${OBJCOPY} squat.elf -O binary squat.img
29 squat.elf: linker.ld ${OBJS}
30 ${LD} -T linker.ld -o squat.elf ${OBJS}
33 ${AS} ${ASFLAGS} -c boot.S -o boot.o
36 rm -rf *.o squat.elf squat.img
39 qemu-system-${ARCH} -M ${BOARD} -cpu cortex-a53 \
40 -kernel squat.img -nographic -monitor none -serial stdio
42 qemu-system-${ARCH} -s -S -M ${BOARD} -cpu cortex-a53 \
43 -kernel squat.img -nographic -monitor none -serial stdio