diff --git a/nemu/Makefile b/nemu/Makefile index 4b38d4143ab2fa491888423a6f7ea7501edcec0d..d078c9e6801cf67d1952f0a22057c9b1024a9e4f 100644 --- a/nemu/Makefile +++ b/nemu/Makefile @@ -16,10 +16,10 @@ include Makefile.git .DEFAULT_GOAL = app # Compilation flags -CC = gcc -LD = gcc +CC ?= gcc +LD = $(CC) INCLUDES = $(addprefix -I, $(INC_DIR)) -CFLAGS += -O2 -MMD -Wall -Werror -ggdb3 $(INCLUDES) -fomit-frame-pointer +CFLAGS += -O2 -MMD -Wall -ggdb3 $(INCLUDES) -fomit-frame-pointer CFLAGS += -DDIFF_TEST_QEMU # Files to be compiled @@ -30,7 +30,7 @@ OBJS = $(SRCS:src/%.c=$(OBJ_DIR)/%.o) $(OBJ_DIR)/%.o: src/%.c @echo + CC $< @mkdir -p $(dir $@) - @$(CC) $(CFLAGS) $(SO_CFLAGS) -c -o $@ $< + $(CC) $(CFLAGS) $(SO_CFLAGS) -c -o $@ $< # Uncomment the below assignment for test # TESTCASE=dummy diff --git a/nemu/Makefile.git b/nemu/Makefile.git index 313937c5457af69924881eb5e64912730165fc9e..47abe4a18edebbe4a76fb0d1a07aae50db60f69f 100644 --- a/nemu/Makefile.git +++ b/nemu/Makefile.git @@ -1,14 +1,28 @@ -STUID = 171220000 -STUNAME = å¼ ä¸‰ +STUID = U201614531 +STUNAME = 刘本嵩 # DO NOT modify the following code!!! GITFLAGS = -q --author='tracer-ics2018 <tracer@njuics.org>' --no-verify --allow-empty # prototype: git_commit(msg) -define git_commit - -@git add .. -A --ignore-errors +define git_commit_origin + -@echo Generating HUST commit: "> $(1)" +# -@git add .. -A --ignore-errors -@while (test -e .git/index.lock); do sleep 0.1; done -@(echo "> $(1)" && echo $(STUID) && id -un && uname -a && uptime && (head -c 20 /dev/urandom | hexdump -v -e '"%02x"') && echo) | git commit -F - $(GITFLAGS) -@sync endef + +define git_commit + -@echo Recolic helped you to prevent fucking junks! +endef + +git_gen: +ifeq ($(M),) + @echo 'Usage: make git_gen M="Some message"' + @echo ' or: env M="Some message" make git_gen' +else + $(call git_commit_origin, "Manual commit: " $(M)) +endif +