1 620d1d53 2023-02-20 continue -include local.mk
2 620d1d53 2023-02-20 continue BOARD ?=qemu_virt
3 620d1d53 2023-02-20 continue BIN ?=/usr/local/bin/
4 620d1d53 2023-02-20 continue OBJCOPY ?=llvm-objcopy
6 f56312c5 2023-02-14 continue ARCH = aarch64
7 f56312c5 2023-02-14 continue TARGET = ${ARCH}-none-elf
9 98601545 2023-02-18 continue AS = ${BIN}clang
10 f56312c5 2023-02-14 continue ASFLAGS = -target ${TARGET}
11 98601545 2023-02-18 continue ASFILES = boot.o
13 98601545 2023-02-18 continue CXX = ${BIN}clang++
14 98601545 2023-02-18 continue CXXFLAGS = -target ${TARGET} -Wall -Wextra -nostdlib -fno-exceptions
15 98601545 2023-02-18 continue CXXFLAGS += -ffreestanding -mgeneral-regs-only
16 8b3b29b7 2023-02-18 continue CXXFLAGS += -Iinclude
17 98601545 2023-02-18 continue CXXFILES = kernel.cc uart_${BOARD}.cc
19 98601545 2023-02-18 continue OBJS = ${ASFILES:.S=.o} ${CXXFILES:.cc=.o}
20 98601545 2023-02-18 continue LD = ${BIN}ld.lld
22 f56312c5 2023-02-14 continue .PHONY: clean
24 98601545 2023-02-18 continue all: squat.img
26 98601545 2023-02-18 continue squat.img: squat.elf
27 620d1d53 2023-02-20 continue ${OBJCOPY} squat.elf -O binary squat.img
29 98601545 2023-02-18 continue squat.elf: linker.ld ${OBJS}
30 98601545 2023-02-18 continue ${LD} -T linker.ld -o squat.elf ${OBJS}
33 98601545 2023-02-18 continue ${AS} ${ASFLAGS} -c boot.S -o boot.o
36 98601545 2023-02-18 continue rm -rf *.o squat.elf squat.img