From c2105d0ed7db45a86fb579e2db796c48c1d4891b Mon Sep 17 00:00:00 2001 From: kdeme Date: Tue, 26 Nov 2019 16:09:58 +0100 Subject: [PATCH] Workaround for nim file output issue + add compilation of static whisper example --- Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 15ab6ddc1..8011921c7 100644 --- a/Makefile +++ b/Makefile @@ -93,11 +93,14 @@ wrappers: | build deps libnimbus.so go-checks libnimbus.a: | build deps echo -e $(BUILD_MSG) "build/$@" && \ rm -f build/$@ && \ - $(ENV_SCRIPT) nim c --app:staticlib --noMain --nimcache:nimcache/libnimbus $(NIM_PARAMS) -o:build/$@ wrappers/libnimbus.nim + $(ENV_SCRIPT) nim c --app:staticlib --noMain --nimcache:nimcache/libnimbus $(NIM_PARAMS) wrappers/libnimbus.nim && \ + mv libnimbus build/$@ # workaround for https://github.com/nim-lang/Nim/issues/12745 wrappers-static: | build deps libnimbus.a go-checks echo -e $(BUILD_MSG) "build/C_wrapper_example_static" && \ $(CC) wrappers/wrapper_example.c -static -pthread -Lbuild -lnimbus -lm -ldl -lpcre -g -o build/C_wrapper_example_static echo -e $(BUILD_MSG) "build/go_wrapper_example_static" && \ go build -ldflags "-linkmode external -extldflags '-static -ldl -lpcre'" -o build/go_wrapper_example_static wrappers/wrapper_example.go wrappers/cfuncs.go + echo -e $(BUILD_MSG) "build/go_wrapper_whisper_example_static" && \ + go build -ldflags "-linkmode external -extldflags '-static -ldl -lpcre'" -o build/go_wrapper_whisper_example_static wrappers/wrapper_example.go wrappers/cfuncs.go