NJU-ProjectN/nemu ics2023 initialized
NJU-ProjectN/nemu eb63cf3568dbf4e0c3c6ef462e6ec685550fabbc Merge pull request #76 from rijuyuezhu/master
This commit is contained in:
parent
1efe03efb9
commit
2824efad33
141 changed files with 19573 additions and 0 deletions
50
nemu/scripts/native.mk
Normal file
50
nemu/scripts/native.mk
Normal file
|
@ -0,0 +1,50 @@
|
|||
#***************************************************************************************
|
||||
# Copyright (c) 2014-2022 Zihao Yu, Nanjing University
|
||||
#
|
||||
# NEMU is licensed under Mulan PSL v2.
|
||||
# You can use this software according to the terms and conditions of the Mulan PSL v2.
|
||||
# You may obtain a copy of Mulan PSL v2 at:
|
||||
# http://license.coscl.org.cn/MulanPSL2
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
|
||||
# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
|
||||
# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
|
||||
#
|
||||
# See the Mulan PSL v2 for more details.
|
||||
#**************************************************************************************/
|
||||
|
||||
-include $(NEMU_HOME)/../Makefile
|
||||
include $(NEMU_HOME)/scripts/build.mk
|
||||
|
||||
include $(NEMU_HOME)/tools/difftest.mk
|
||||
|
||||
compile_git:
|
||||
$(call git_commit, "compile NEMU")
|
||||
$(BINARY):: compile_git
|
||||
|
||||
# Some convenient rules
|
||||
|
||||
override ARGS ?= --log=$(BUILD_DIR)/nemu-log.txt
|
||||
override ARGS += $(ARGS_DIFF)
|
||||
|
||||
# Command to execute NEMU
|
||||
IMG ?=
|
||||
NEMU_EXEC := $(BINARY) $(ARGS) $(IMG)
|
||||
|
||||
run-env: $(BINARY) $(DIFF_REF_SO)
|
||||
|
||||
run: run-env
|
||||
$(call git_commit, "run NEMU")
|
||||
$(NEMU_EXEC)
|
||||
|
||||
gdb: run-env
|
||||
$(call git_commit, "gdb NEMU")
|
||||
gdb -s $(BINARY) --args $(NEMU_EXEC)
|
||||
|
||||
clean-tools = $(dir $(shell find ./tools -maxdepth 2 -mindepth 2 -name "Makefile"))
|
||||
$(clean-tools):
|
||||
-@$(MAKE) -s -C $@ clean
|
||||
clean-tools: $(clean-tools)
|
||||
clean-all: clean distclean clean-tools
|
||||
|
||||
.PHONY: run gdb run-env clean-tools clean-all $(clean-tools)
|
Loading…
Add table
Add a link
Reference in a new issue