From 0f1770031bb9e9f77ead80aea6a6ea0f174a70df Mon Sep 17 00:00:00 2001 From: chyyuu Date: Tue, 12 Mar 2013 08:39:36 -0400 Subject: [PATCH] update lab8 Makefile: for disk0 DIR --- code/lab8/Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/code/lab8/Makefile b/code/lab8/Makefile index 884b4cc..b4037c8 100644 --- a/code/lab8/Makefile +++ b/code/lab8/Makefile @@ -3,8 +3,6 @@ EMPTY := SPACE := $(EMPTY) $(EMPTY) SLASH := / -V := @ - # try to infer the correct GCCPREFX ifndef GCCPREFIX GCCPREFIX := $(shell if i386-ucore-elf-objdump -i 2>&1 | grep '^elf32-i386$$' >/dev/null 2>&1; \ @@ -261,6 +259,9 @@ endef $(foreach p,$(USER_BINS),$(eval $(call fscopy,$(p),$(SFSROOT)$(SLASH)))) +$(SFSROOT): + if [ ! -d "$(SFSROOT)" ]; then mkdir $(SFSROOT); fi + $(SFSIMG): $(SFSROOT) $(SFSBINS) | $(call totarget,mksfs) $(V)dd if=/dev/zero of=$@ bs=1M count=128 @$(call totarget,mksfs) $@ $(SFSROOT)