Blame


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