aboutsummaryrefslogtreecommitdiffstats
path: root/rust/Makefile
diff options
context:
space:
mode:
authorGustav Sörnäs <gustav@sornas.net>2020-11-24 00:41:57 +0100
committerGustav Sörnäs <gustav@sornas.net>2020-11-24 00:41:57 +0100
commitc57b3079ef115ebf3a5fa25acdae043b31948ef3 (patch)
treeb24682654b994a31f99c684e8064c22843b41314 /rust/Makefile
parenteb7ccd85f42f18b39f9ac25c20147c8e06f49bc9 (diff)
downloadpintos-rs-c57b3079ef115ebf3a5fa25acdae043b31948ef3.tar.gz
add rust release target, compile and copy libpintos
Diffstat (limited to 'rust/Makefile')
-rw-r--r--rust/Makefile13
1 files changed, 11 insertions, 2 deletions
diff --git a/rust/Makefile b/rust/Makefile
index 4a894f2..7efb89c 100644
--- a/rust/Makefile
+++ b/rust/Makefile
@@ -1,7 +1,16 @@
-all:
+all: debug
+
+debug: libpintos.a
cargo rustc -- -C link-arg= -L.
+release: libpintos.a
+ cargo rustc --release -- -C link-arg= -L.
+
+libpintos.a:
+ make -C ../src/examples libc.a
+ cp ../src/examples/libc.a libpintos.a
+
clean:
cargo clean
-.PHONY: all clean
+.PHONY: all clean debug release libpintos.a