Merge pull request #1791 from Smartsmurf/next

fixed library extension to build properly under CYGWIN
This commit is contained in:
Wu ChenXu 2021-11-11 00:26:14 +08:00 committed by GitHub
commit ca3f8b4380
2 changed files with 9 additions and 1 deletions

View File

@ -382,7 +382,7 @@ ifeq ($(CAPSTONE_SHARED),yes)
ifeq ($(IS_MINGW),1)
LIBRARY = $(BLDIR)/$(LIBNAME).$(VERSION_EXT)
else ifeq ($(IS_CYGWIN),1)
LIBRARY = $(BLDIR)/$(LIBNAME).$(VERSION_EXT)
LIBRARY = $(BLDIR)/$(LIBNAME).$(EXT)
else # *nix
LIBRARY = $(BLDIR)/lib$(LIBNAME).$(VERSION_EXT)
CFLAGS += -fvisibility=hidden

View File

@ -31,8 +31,16 @@ FUZZLDFLAGS =
LIBNAME = capstone
IS_CYGWIN := $(shell $(CC) -dumpmachine 2>/dev/null | grep -i cygwin | wc -l)
ifeq ($(IS_CYGWIN),1)
EXT = dll
AR_EXT = lib
ARCHIVE = $(LIBDIR)/$(LIBNAME).$(AR_EXT)
else
BIN_EXT =
AR_EXT = a
ARCHIVE = $(LIBDIR)/lib$(LIBNAME).$(AR_EXT)
endif
ARCHIVE = $(LIBDIR)/lib$(LIBNAME).$(AR_EXT)