-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
50 lines (38 loc) · 832 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
BUILD_DIR := ./build
ifndef QEMU
QEMU := qemu-system-aarch64
endif
LAB := 1
# try to generate a unique GDB port
GDBPORT := 1234
QEMUOPTS = -machine raspi3 -serial null -serial mon:stdio -m size=1G -kernel $(BUILD_DIR)/kernel.img -gdb tcp::1234
IMAGES = $(BUILD_DIR)/kernel.img
all: build
gdb:
gdb-multiarch -n -x .gdbinit
build: FORCE
./scripts/docker_build.sh
qemu: $(IMAGES)
$(QEMU) $(QEMUOPTS)
qemu-gdb: $(IMAGES)
@echo "***"
@echo "*** make qemu-gdb'." 1>&2
@echo "***"
$(QEMU) -nographic $(QEMUOPTS) -S
gdbport:
@echo $(GDBPORT)
docker: FORCE
./scripts/run_docker.sh
grade: build FORCE
@echo "make grade"
@echo "LAB"$(LAB)": test >>>>>>>>>>>>>>>>>"
ifeq ($(LAB), 2)
./scripts/run_mm_test.sh
endif
./scripts/grade-lab$(LAB)
.PHONY: clean
clean:
@rm -rf build
@rm -rf chcore.out
.PHONY: FORCE
FORCE: