summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2018-03-20 15:21:45 +0100
committerJustus Winter <justus@sequoia-pgp.org>2018-03-23 11:31:27 +0100
commita9ab4082e13434591131e0041a4234be6d92fea0 (patch)
tree39ce6c927cee4ed58e194812cb6cae317c2d8664
parentc6dd617101daecc3736ef4859f6129d0f0baa34f (diff)
ffi: Build a shared object and a library archive.
- Build the correct kind of dynamic library, a 'cdylib' instead a 'dylib'. The former seems to be a Rust dynamic library. - Also build and install a library archive for static linking.
-rw-r--r--ffi/Cargo.toml2
-rw-r--r--ffi/Makefile2
2 files changed, 3 insertions, 1 deletions
diff --git a/ffi/Cargo.toml b/ffi/Cargo.toml
index 8faf8fdb..98f2fcc7 100644
--- a/ffi/Cargo.toml
+++ b/ffi/Cargo.toml
@@ -14,4 +14,4 @@ libc = "0.2.33"
native-tls = "0.1.4"
[lib]
-crate-type = ["dylib"]
+crate-type = ["cdylib", "staticlib"]
diff --git a/ffi/Makefile b/ffi/Makefile
index a33db873..c97852e4 100644
--- a/ffi/Makefile
+++ b/ffi/Makefile
@@ -43,6 +43,8 @@ install:
$(DESTDIR)$(PREFIX)/lib/libsequoia.so.$(VERSION)
ln -fs libsequoia.so.$(VERSION) \
$(DESTDIR)$(PREFIX)/lib/libsequoia.so.$(VERSION_MAJOR)
+ $(INSTALL) ../target/release/libsequoia_ffi.a \
+ $(DESTDIR)$(PREFIX)/lib/libsequoia.a
# Housekeeping.
.PHONY: clean