aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGustav Sörnäs <gustav@sornas.net>2020-11-23 15:00:14 +0100
committerGustav Sörnäs <gustav@sornas.net>2020-11-23 15:00:14 +0100
commit30c54113477b08c7650194a16cf7a63a7cdd142f (patch)
tree9c31da7f6d07d70b6bf80b846976b8641cf88ace /src
parent20eb8b73f7914c86812eda4b3b14ee2d0cd5a826 (diff)
downloadpintos-rs-30c54113477b08c7650194a16cf7a63a7cdd142f.tar.gz
update Makefile.userprog
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.userprog9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/Makefile.userprog b/src/Makefile.userprog
index 3c4d404..165d7ed 100644
--- a/src/Makefile.userprog
+++ b/src/Makefile.userprog
@@ -25,6 +25,8 @@ LIB_OBJ = $(patsubst %.c,%.o,$(patsubst %.S,%.o,$(lib_SRC) $(lib/user_SRC)))
LIB_DEP = $(patsubst %.o,%.d,$(LIB_OBJ))
LIB = lib/user/entry.o libc.a librust.a
+LIBDIR_RUST = $(SRCDIR)/../rust
+
PROGS_SRC = $(foreach prog,$(PROGS),$($(prog)_SRC))
PROGS_OBJ = $(patsubst %.c,%.o,$(patsubst %.S,%.o,$(PROGS_SRC)))
PROGS_DEP = $(patsubst %.o,%.d,$(PROGS_OBJ))
@@ -49,13 +51,14 @@ libc.a: $(LIB_OBJ)
ranlib $@
librust.a:
- make -C $(SRCDIR)/../halt all
- cp $(SRCDIR)/../rust/target/debug/librust.a $@
+ make -C $(LIBDIR_RUST) all
+ cp $(LIBDIR_RUST)/target/debug/librust.a $@
clean::
rm -f $(PROGS) $(PROGS_OBJ) $(PROGS_DEP)
+ make -C $(LIBDIR_RUST) clean
rm -f $(LIB_DEP) $(LIB_OBJ) lib/user/entry.[do] libc.a librust.a
-.PHONY: all clean
+.PHONY: all clean librust.a
-include $(LIB_DEP) $(PROGS_DEP)