From a9ab4082e13434591131e0041a4234be6d92fea0 Mon Sep 17 00:00:00 2001 From: Justus Winter Date: Tue, 20 Mar 2018 15:21:45 +0100 Subject: 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. --- ffi/Cargo.toml | 2 +- ffi/Makefile | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3