add SONAME for .so library. issue reported by Anton Bolshakov

This commit is contained in:
Nguyen Anh Quynh 2013-12-25 23:54:45 +08:00
parent 9f0e6c24ae
commit 4ebdd216f1

View File

@ -47,13 +47,11 @@ ifneq (,$(findstring aarch64,$(CAPSTONE_ARCHS)))
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 @@ AR_EXT = dll.a
# 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