Blame


1 ec901abe 2023-02-20 continue AS = clang
2 ec901abe 2023-02-20 continue CXX = clang++
3 ec901abe 2023-02-20 continue LD = ld.lld
4 4eb324fc 2023-02-20 continue OBJCOPY = llvm-objcopy
5 620d1d53 2023-02-20 continue
6 f56312c5 2023-02-14 continue ARCH = aarch64
7 f56312c5 2023-02-14 continue TARGET = ${ARCH}-none-elf
8 6efd408f 2023-03-01 continue BOARD = virt
9 f56312c5 2023-02-14 continue
10 f56312c5 2023-02-14 continue ASFLAGS = -target ${TARGET}
11 f7e75ee1 2023-03-03 continue ASFILES = boot.S
12 f56312c5 2023-02-14 continue
13 621c3fa7 2023-03-02 continue CXXFLAGS = -target ${TARGET}
14 621c3fa7 2023-03-02 continue CXXFLAGS +=-Wall -Wextra -Werror
15 621c3fa7 2023-03-02 continue CXXFLAGS +=-nostdlib -fno-exceptions -std=c++11
16 ec901abe 2023-02-20 continue CXXFLAGS +=-ffreestanding -mgeneral-regs-only
17 621c3fa7 2023-03-02 continue CXXFLAGS +=-Iinclude
18 98601545 2023-02-18 continue CXXFILES = kernel.cc uart_${BOARD}.cc
19 f56312c5 2023-02-14 continue
20 ec901abe 2023-02-20 continue OBJS = ${ASFILES:.S=.o} ${CXXFILES:.cc=.o}
21 98601545 2023-02-18 continue
22 f7e75ee1 2023-03-03 continue -include config.mk
23 f7e75ee1 2023-03-03 continue
24 3be3b31b 2023-03-02 continue .PHONY: clean qemu gdb-remote
25 f56312c5 2023-02-14 continue
26 98601545 2023-02-18 continue all: squat.img
27 f56312c5 2023-02-14 continue
28 98601545 2023-02-18 continue squat.img: squat.elf
29 620d1d53 2023-02-20 continue ${OBJCOPY} squat.elf -O binary squat.img
30 f56312c5 2023-02-14 continue
31 98601545 2023-02-18 continue squat.elf: linker.ld ${OBJS}
32 98601545 2023-02-18 continue ${LD} -T linker.ld -o squat.elf ${OBJS}
33 98601545 2023-02-18 continue
34 f56312c5 2023-02-14 continue .S.o:
35 f7e75ee1 2023-03-03 continue ${AS} ${ASFLAGS} -c $< -o $@
36 98601545 2023-02-18 continue
37 98601545 2023-02-18 continue clean:
38 98601545 2023-02-18 continue rm -rf *.o squat.elf squat.img
39 6efd408f 2023-03-01 continue
40 3be3b31b 2023-03-02 continue qemu: squat.img
41 3be3b31b 2023-03-02 continue qemu-system-${ARCH} -M ${BOARD} -cpu cortex-a53 \
42 3be3b31b 2023-03-02 continue -kernel squat.img -nographic -monitor none -serial stdio
43 3be3b31b 2023-03-02 continue gdb-remote: squat.img
44 6efd408f 2023-03-01 continue qemu-system-${ARCH} -s -S -M ${BOARD} -cpu cortex-a53 \
45 6efd408f 2023-03-01 continue -kernel squat.img -nographic -monitor none -serial stdio