Blob
1 -include local.mk2 BOARD ?=qemu_virt3 BIN ?=/usr/local/bin/4 OBJCOPY ?=llvm-objcopy6 ARCH = aarch647 TARGET = ${ARCH}-none-elf9 AS = ${BIN}clang10 ASFLAGS = -target ${TARGET}11 ASFILES = boot.o13 CXX = ${BIN}clang++14 CXXFLAGS = -target ${TARGET} -Wall -Wextra -nostdlib -fno-exceptions15 CXXFLAGS += -ffreestanding -mgeneral-regs-only16 CXXFLAGS += -Iinclude17 CXXFILES = kernel.cc uart_${BOARD}.cc19 OBJS = ${ASFILES:.S=.o} ${CXXFILES:.cc=.o}20 LD = ${BIN}ld.lld22 .PHONY: clean24 all: squat.img26 squat.img: squat.elf27 ${OBJCOPY} squat.elf -O binary squat.img29 squat.elf: linker.ld ${OBJS}30 ${LD} -T linker.ld -o squat.elf ${OBJS}32 .S.o:33 ${AS} ${ASFLAGS} -c boot.S -o boot.o35 clean:36 rm -rf *.o squat.elf squat.img