diff --git a/Makefile b/Makefile index b864c1f..473cedb 100644 --- a/Makefile +++ b/Makefile @@ -17,12 +17,13 @@ UNAME := $(shell uname) SED := sed -i LIB_NAME := libgovarnam.so SO_NAME := $(shell (echo $(VERSION) | cut -d. -f1)) +CURDIR := $(shell pwd) ifeq ($(UNAME), Darwin) SED := sed -i "" LIB_NAME = libgovarnam.dylib else - EXT_LDFLAGS = -extldflags -Wl,-soname,$(LIB_NAME).$(SO_NAME) + EXT_LDFLAGS = -extldflags "-Wl,-soname,$(LIB_NAME).$(SO_NAME),--version-script,$(CURDIR)/govarnam.syms" endif VERSION_STAMP_LDFLAGS := -X 'github.com/varnamproject/govarnam/govarnam.BuildString=${BUILDSTR}' -X 'github.com/varnamproject/govarnam/govarnam.VersionString=${VERSION}' $(EXT_LDFLAGS) diff --git a/govarnam.syms b/govarnam.syms new file mode 100644 index 0000000..8e5bdd1 --- /dev/null +++ b/govarnam.syms @@ -0,0 +1,9 @@ +{ + global: + varnam_*; + varray_*; + vm_*; + local: + *; +}; +