summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--exes/all/Cargo.toml2
-rw-r--r--exes/all/Makefile6
-rw-r--r--exes/all/build.rs1
-rw-r--r--exes/all/main.go2
4 files changed, 5 insertions, 6 deletions
diff --git a/exes/all/Cargo.toml b/exes/all/Cargo.toml
index d6976ef..41396fc 100644
--- a/exes/all/Cargo.toml
+++ b/exes/all/Cargo.toml
@@ -25,7 +25,7 @@ config = "0.13.3"
pretty_env_logger = "0.4.0"
[lib]
-crate-type = ["cdylib"]
+crate-type = ["staticlib"]
[build-dependencies]
cbindgen = "0.24.3" \ No newline at end of file
diff --git a/exes/all/Makefile b/exes/all/Makefile
index 07c02d9..22a67e0 100644
--- a/exes/all/Makefile
+++ b/exes/all/Makefile
@@ -1,12 +1,12 @@
clean:
- rm ./build/libhello.so
+ rm ./build/*
library:
cargo build --release
build: library
- cp ../../target/release/liball.so ./build
- go build -ldflags="-r build" -o build/all
+ cp ../../target/release/liball.a ./build
+ go build -a -ldflags '-s' -o build/all
all: library build
diff --git a/exes/all/build.rs b/exes/all/build.rs
index e779d53..c52ad11 100644
--- a/exes/all/build.rs
+++ b/exes/all/build.rs
@@ -15,7 +15,6 @@ fn main() {
.to_string();
let config = Config {
- namespace: Some(String::from("ffi")),
language: Language::C,
..Default::default()
};
diff --git a/exes/all/main.go b/exes/all/main.go
index 0d15450..6e1f7c0 100644
--- a/exes/all/main.go
+++ b/exes/all/main.go
@@ -1,7 +1,7 @@
package main
/*
-#cgo LDFLAGS: -Lbuild -lall
+#cgo LDFLAGS: -L./build -lall -lcrypto -lz -ldl -lssl -lm -static-libgcc
#include "./build/all.h"
*/
import "C"