From 20eb8b73f7914c86812eda4b3b14ee2d0cd5a826 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gustav=20S=C3=B6rn=C3=A4s?= Date: Mon, 23 Nov 2020 14:52:17 +0100 Subject: userprog makefile --- src/Makefile.userprog | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/Makefile.userprog') diff --git a/src/Makefile.userprog b/src/Makefile.userprog index f7271fe..3c4d404 100644 --- a/src/Makefile.userprog +++ b/src/Makefile.userprog @@ -23,7 +23,7 @@ lib/user_SRC += lib/user/console.c # Console code. 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 +LIB = lib/user/entry.o libc.a librust.a PROGS_SRC = $(foreach prog,$(PROGS),$($(prog)_SRC)) PROGS_OBJ = $(patsubst %.c,%.o,$(patsubst %.S,%.o,$(PROGS_SRC))) @@ -48,9 +48,13 @@ libc.a: $(LIB_OBJ) ar r $@ $^ ranlib $@ +librust.a: + make -C $(SRCDIR)/../halt all + cp $(SRCDIR)/../rust/target/debug/librust.a $@ + clean:: rm -f $(PROGS) $(PROGS_OBJ) $(PROGS_DEP) - rm -f $(LIB_DEP) $(LIB_OBJ) lib/user/entry.[do] libc.a + rm -f $(LIB_DEP) $(LIB_OBJ) lib/user/entry.[do] libc.a librust.a .PHONY: all clean -- cgit v1.2.1