加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Makefile 1.14 KB
一键复制 编辑 原始数据 按行查看 历史
BUILD_DIR := ./build
ifndef QEMU
QEMU := qemu-system-aarch64
endif
LAB := 5
# 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 -nographic
IMAGES = $(BUILD_DIR)/kernel.img
all: user build
gdb:
gdb-multiarch -n -x .gdbinit
build: FORCE
./scripts/docker_build.sh $(bin)
user: FORCE
./scripts/docker_build_user.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: user 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
prep-%:
@echo "*** Now building application $*"
./scripts/docker_build.sh $*
./scripts/create_gdbinit.sh $*
run-%: prep-%
@echo "*** Now starting qemu"
$(QEMU) $(QEMUOPTS)
run-%-gdb: prep-%
@echo "*** Now starting qemu-gdb"
$(QEMU) $(QEMUOPTS) -S
.PHONY: FORCE
FORCE:
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化