aboutsummaryrefslogtreecommitdiff
path: root/nix-rust/local.mk
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2019-03-27 14:12:20 +0100
committerEelco Dolstra <edolstra@gmail.com>2019-11-26 22:07:28 +0100
commit11da5b2816e11b081d8ff38db4330addd2014f7e (patch)
treefeeffda49248279c72805048bcebf1839a869015 /nix-rust/local.mk
parentabb8ef619ba2fab3ae16fb5b5430215905bac723 (diff)
Add some Rust code
Diffstat (limited to 'nix-rust/local.mk')
-rw-r--r--nix-rust/local.mk7
1 files changed, 7 insertions, 0 deletions
diff --git a/nix-rust/local.mk b/nix-rust/local.mk
new file mode 100644
index 000000000..c69e3b9ea
--- /dev/null
+++ b/nix-rust/local.mk
@@ -0,0 +1,7 @@
+libnixrust_PATH := $(d)/target/release/libnixrust.a
+libnixrust_INSTALL_PATH := $(libnixrust_PATH)
+libnixrust_LDFLAGS_USE := -L$(d)/target/release -lnixrust -ldl
+libnixrust_LDFLAGS_USE_INSTALLED := $(libnixrust_LDFLAGS_USE)
+
+$(d)/target/release/libnixrust.a: $(wildcard $(d)/src/*.rs) $(d)/Cargo.toml
+ $(trace-gen) cd nix-rust && RUSTC_BOOTSTRAP=1 cargo build --release && touch target/release/libnixrust.a