From 8190bd4c1f243b374b0061512d63a08764e6a6f0 Mon Sep 17 00:00:00 2001 From: tracer-ysyx Date: Sat, 13 Jan 2024 14:23:41 +0800 Subject: [PATCH] =?UTF-8?q?>=20compile=20NEMU=20ysyx=5F22040000=20?= =?UTF-8?q?=E6=9D=8E=E5=BF=83=E6=9D=A8=20Linux=20calcite=206.1.71=20#1-Nix?= =?UTF-8?q?OS=20SMP=20PREEMPT=5FDYNAMIC=20Fri=20Jan=20=205=2014:18:41=20UT?= =?UTF-8?q?C=202024=20x86=5F64=20GNU/Linux=20=2014:23:41=20=20up=20=20=203?= =?UTF-8?q?:18,=20=202=20users,=20=20load=20average:=201.90,=201.06,=200.7?= =?UTF-8?q?9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nemu/scripts/build.mk | 10 +++++----- nemu/src/monitor/sdb/filelist.mk | 1 - 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/nemu/scripts/build.mk b/nemu/scripts/build.mk index 6d8c623..f050197 100644 --- a/nemu/scripts/build.mk +++ b/nemu/scripts/build.mk @@ -10,7 +10,7 @@ endif WORK_DIR = $(shell pwd) BUILD_DIR = $(WORK_DIR)/build -INC_PATH := $(WORK_DIR)/include $(INC_PATH) +INC_PATH := $(WORK_DIR)/include $(BUILD_DIR)/include $(INC_PATH) OBJ_DIR = $(BUILD_DIR)/obj-$(NAME)$(SO) BINARY = $(BUILD_DIR)/$(NAME)$(SO) @@ -42,13 +42,13 @@ $(OBJ_DIR)/%.o: %.cc $(OBJ_DIR)/%.tag.c: %.y @echo + YACC $< - @mkdir -p $(dir $@) - @$(YACC) $(YFLAGS) --header=$(dir %)/$(<:.y=.h) -o $@ $< + @mkdir -p $(dir $@) $(BUILD_DIR)/include + @$(YACC) $(YFLAGS) --header=$(BUILD_DIR)/include/$(notdir $(<:.y=.h)) -o $@ $< $(OBJ_DIR)/%.yy.c: %.l $(OBJ_DIR)/%.tag.c @echo + LEX $< - @mkdir -p $(dir $@) - @$(LEX) $(LFLAGS) --header=$(dir %)/$(<:.l=_lex.h) -o $@ $< + @mkdir -p $(dir $@) $(BUILD_DIR)/include + @$(LEX) $(LFLAGS) --header=$(BUILD_DIR)/include/$(notdir $(<:.l=_lex.h)) -o $@ $< $(OBJ_DIR)/%.tag.o: $(OBJ_DIR)/%.tag.c @echo + CC $< diff --git a/nemu/src/monitor/sdb/filelist.mk b/nemu/src/monitor/sdb/filelist.mk index 440694a..f477a4f 100644 --- a/nemu/src/monitor/sdb/filelist.mk +++ b/nemu/src/monitor/sdb/filelist.mk @@ -1,3 +1,2 @@ SRCS-y += src/monitor/sdb/addrexp.tag.c src/monitor/sdb/addrexp.yy.c -INC_PATH += $(OBJ_DIR)/src/monitor/sdb LFLAGS += -DYY_NO_UNPUT -DYY_NO_INPUT