aboutsummaryrefslogtreecommitdiff
path: root/nix-rust/local.mk
diff options
context:
space:
mode:
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