From cee18efd710756c662c19ea9b167a47112847388 Mon Sep 17 00:00:00 2001 From: Richard Ramos Date: Sun, 19 Sep 2021 10:25:47 -0400 Subject: [PATCH] chore: add soname to libstatus.so --- Makefile | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Makefile b/Makefile index 722864e0c..7b66ad70e 100644 --- a/Makefile +++ b/Makefile @@ -26,6 +26,7 @@ else ifeq ($(detected_OS),Windows) GOBIN_SHARED_LIB_EXT := dll else GOBIN_SHARED_LIB_EXT := so + GOBIN_SHARED_LIB_CGO_LDFLAGS := CGO_LDFLAGS="-Wl,-soname,libstatus.so.0" endif help: ##@other Show this help @@ -160,6 +161,12 @@ statusgo-shared-library: ##@cross-compile Build status-go as shared library for -buildmode=c-shared \ -o $(GOBIN)/libstatus.$(GOBIN_SHARED_LIB_EXT) \ $(GOBIN)/statusgo-lib +ifeq ($(detected_OS),Linux) + cd $(GOBIN) && \ + ls -lah . && \ + mv ./libstatus.$(GOBIN_SHARED_LIB_EXT) ./libstatus.$(GOBIN_SHARED_LIB_EXT).0 && \ + ln -s ./libstatus.$(GOBIN_SHARED_LIB_EXT).0 ./libstatus.$(GOBIN_SHARED_LIB_EXT) +endif @echo "Shared library built:" @ls -la $(GOBIN)/libstatus.*