chore: add soname to libstatus.so
This commit is contained in:
parent
524e864398
commit
cee18efd71
7
Makefile
7
Makefile
|
@ -26,6 +26,7 @@ else ifeq ($(detected_OS),Windows)
|
||||||
GOBIN_SHARED_LIB_EXT := dll
|
GOBIN_SHARED_LIB_EXT := dll
|
||||||
else
|
else
|
||||||
GOBIN_SHARED_LIB_EXT := so
|
GOBIN_SHARED_LIB_EXT := so
|
||||||
|
GOBIN_SHARED_LIB_CGO_LDFLAGS := CGO_LDFLAGS="-Wl,-soname,libstatus.so.0"
|
||||||
endif
|
endif
|
||||||
|
|
||||||
help: ##@other Show this help
|
help: ##@other Show this help
|
||||||
|
@ -160,6 +161,12 @@ statusgo-shared-library: ##@cross-compile Build status-go as shared library for
|
||||||
-buildmode=c-shared \
|
-buildmode=c-shared \
|
||||||
-o $(GOBIN)/libstatus.$(GOBIN_SHARED_LIB_EXT) \
|
-o $(GOBIN)/libstatus.$(GOBIN_SHARED_LIB_EXT) \
|
||||||
$(GOBIN)/statusgo-lib
|
$(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:"
|
@echo "Shared library built:"
|
||||||
@ls -la $(GOBIN)/libstatus.*
|
@ls -la $(GOBIN)/libstatus.*
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue