From 42fb48b9dad38ae29d40655b95d95f25e5dcb095 Mon Sep 17 00:00:00 2001 From: tracer-ysyx Date: Fri, 12 Jan 2024 18:16:58 +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.69=20#1-Nix?= =?UTF-8?q?OS=20SMP=20PREEMPT=5FDYNAMIC=20Wed=20Dec=2020=2016:00:29=20UTC?= =?UTF-8?q?=202023=20x86=5F64=20GNU/Linux=20=2018:16:58=20=20up=20=2018:32?= =?UTF-8?q?,=20=202=20users,=20=20load=20average:=200.53,=200.44,=200.35?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nemu/scripts/build.mk | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/nemu/scripts/build.mk b/nemu/scripts/build.mk index 07c3c79..e6c11bb 100644 --- a/nemu/scripts/build.mk +++ b/nemu/scripts/build.mk @@ -45,11 +45,23 @@ $(OBJ_DIR)/%.tag.c: %.y @mkdir -p $(dir $@) @$(YACC) $(YFLAGS) --header=$(<:.y=.h) -o $@ $< +$(OBJ_DIR)/%.tag.o: $(OBJ_DIR)/%.tag.c + @echo + CC $< + @mkdir -p $(dir $@) + @$(CC) $(CFLAGS) -c -o $@ $< + $(call call_fixdep, $(@:.o=.d), $@) + $(OBJ_DIR)/%.yy.c: %.l $(OBJ_DIR)/%.tag.c @echo + LEX $< @mkdir -p $(dir $@) @$(LEX) $(LFLAGS) -o $@ $< +$(OBJ_DIR)/%.yy.o: %(OBJ_DIR)/%.yy.c + @echo + CC $< + @mkdir -p $(dir $@) + @$(CC) $(CFLAGS) -c -o $@ $< + $(call call_fixdep, $(@:.o=.d), $@) + # Depencies -include $(OBJS:.o=.d)