Skip to content

Commit

Permalink
add SONAME for .so library. issue reported by Anton Bolshakov
Browse files Browse the repository at this point in the history
  • Loading branch information
aquynh committed Dec 25, 2013
1 parent 02ac24f commit 089b716
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
Expand Down

0 comments on commit 089b716

Please sign in to comment.