1 Star 0 Fork 0

labixiaoxin20/NEMU

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
Makefile 1.53 KB
一键复制 编辑 原始数据 按行查看 历史
tracer-NEMU2020 提交于 2024-09-23 07:22 . > compile NEMU
##### global settings #####
.PHONY: nemu entry testcase kernel run gdb test submit clean
CC := gcc
LD := ld
CFLAGS := -MMD -Wall -Werror -c
LIB_COMMON_DIR := lib-common
LIBC_INC_DIR := $(LIB_COMMON_DIR)/uclibc/include
LIBC_LIB_DIR := $(LIB_COMMON_DIR)/uclibc/lib
LIBC := $(LIBC_LIB_DIR)/libc.a
FLOAT := obj/$(LIB_COMMON_DIR)/FLOAT/FLOAT.a
include config/Makefile.git
include config/Makefile.build
all: nemu
##### rules for building the project #####
include nemu/Makefile.part
include testcase/Makefile.part
include lib-common/FLOAT/Makefile.part
include kernel/Makefile.part
include game/Makefile.part
nemu: $(nemu_BIN)
testcase: $(testcase_BIN)
kernel: $(kernel_BIN)
game: $(game_BIN)
##### rules for cleaning the project #####
clean-nemu:
-rm -rf obj/nemu 2> /dev/null
clean-testcase:
-rm -rf obj/testcase 2> /dev/null
clean-kernel:
-rm -rf obj/kernel 2> /dev/null
clean-game:
-rm -rf obj/game 2> /dev/null
clean: clean-cpp
-rm -rf obj 2> /dev/null
-rm -f *log.txt entry $(FLOAT) 2> /dev/null
##### some convinient rules #####
USERPROG := obj/testcase/mov-c
# ENTRY :=$(USERPROG)
ENTRY := $(kernel_BIN)
entry: $(ENTRY)
objcopy -S -O binary $(ENTRY) entry
run: $(nemu_BIN) $(USERPROG) entry
$(call git_commit, "run")
$(nemu_BIN) $(USERPROG)
gdb: $(nemu_BIN) $(USERPROG) entry
$(call git_commit, "gdb")
gdb -s $(nemu_BIN) --args $(nemu_BIN) $(USERPROG)
test: $(nemu_BIN) $(testcase_BIN) entry
$(call git_commit, "test")
bash test.sh $(testcase_BIN)
submit: clean
cd .. && zip -r $(STU_ID).zip $(shell pwd | grep -o '[^/]*$$')
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/labixiaoxin20/nemu.git
[email protected]:labixiaoxin20/nemu.git
labixiaoxin20
nemu
NEMU
master

搜索帮助