add SONAME for .so library. issue reported by Anton Bolshakov
diff --git a/Makefile b/Makefile
index 75b02ed..b6b47ae 100644
--- a/Makefile
+++ b/Makefile
@@ -47,13 +47,11 @@
endif
LIBOBJ += MCInst.o
-EXT = so
-AR_EXT = a
-
# OSX?
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Darwin)
EXT = dylib
+AR_EXT = a
else
# Cygwin?
IS_CYGWIN := $(shell $(CC) -dumpmachine | grep -i cygwin | wc -l)
@@ -72,6 +70,11 @@
# mingw doesn't like -fPIC either
CFLAGS := $(CFLAGS:-fPIC=)
# On Windows we need the shared library to be executable
+else
+# Linux, *BSD
+EXT = so
+AR_EXT = a
+LDFLAGS += -Wl,-soname,$(LIBRARY)
endif
endif
endif