aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGustav Sörnäs <gustav@sornas.net>2020-11-24 17:02:13 +0100
committerGustav Sörnäs <gustav@sornas.net>2020-11-24 17:02:13 +0100
commit6dab587f279e5320dc3fc2dcc9977af98a323c33 (patch)
tree3400124709ea8c36e9c05d15c9734668a7891eee
parente582c817d5702ff11fc662240d5a3e70f0d57389 (diff)
downloadpintos-rs-6dab587f279e5320dc3fc2dcc9977af98a323c33.tar.gz
update clean in src/examples
-rw-r--r--src/Makefile.userprog4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Makefile.userprog b/src/Makefile.userprog
index d6914cf..be47b48 100644
--- a/src/Makefile.userprog
+++ b/src/Makefile.userprog
@@ -56,6 +56,8 @@ lib$(1).a:
.PHONY: lib$(1).a
$(1): rust.o lib$(1).a $$(LIB_RUST) $$(LDSCRIPT)
$$(CC) $$(LDFLAGS) $$(LIB_ENTRY) rust.o lib$(1).a -o $$@
+clean::
+ (cd $$($(1)_SRC) && cargo clean)
endef
$(foreach prog,$(PROGS),$(eval $(call TEMPLATE,$(prog))))
@@ -67,7 +69,7 @@ libc.a: $(LIB_OBJ)
ranlib $@
clean::
- rm -f $(PROGS) $(PROGS_OBJ) $(PROGS_DEP)
+ rm -f $(PROGS) $(PROGS_RS) $(PROGS_OBJ) rust.o $(PROGS_DEP) rust.d
rm -f $(LIB_DEP) $(LIB_OBJ) lib/user/entry.[do] libc.a
.PHONY: all clean