40 lines
1.3 KiB
Diff
40 lines
1.3 KiB
Diff
diff --git a/Makefile b/Makefile
|
|
index 034e254..09bd6c3 100644
|
|
--- a/Makefile
|
|
+++ b/Makefile
|
|
@@ -279,7 +279,7 @@ endif
|
|
API_MAJOR=$(shell echo `grep -e CS_API_MAJOR include/capstone/capstone.h | grep -v = | awk '{print $$3}'` | awk '{print $$1}')
|
|
VERSION_EXT =
|
|
|
|
-IS_APPLE := $(shell $(CC) -dM -E - < /dev/null | grep __apple_build_version__ | wc -l | tr -d " ")
|
|
+IS_APPLE := $(shell $(CC) -dM -E - < /dev/null 2> /dev/null | grep __apple_build_version__ | wc -l | tr -d " ")
|
|
ifeq ($(IS_APPLE),1)
|
|
EXT = dylib
|
|
VERSION_EXT = $(API_MAJOR).$(EXT)
|
|
@@ -296,7 +296,7 @@ endif
|
|
else
|
|
$(LIBNAME)_LDFLAGS += -shared
|
|
# Cygwin?
|
|
-IS_CYGWIN := $(shell $(CC) -dumpmachine | grep -i cygwin | wc -l)
|
|
+IS_CYGWIN := $(shell $(CC) -dumpmachine 2>/dev/null | grep -i cygwin | wc -l)
|
|
ifeq ($(IS_CYGWIN),1)
|
|
EXT = dll
|
|
AR_EXT = lib
|
|
@@ -305,7 +305,7 @@ CFLAGS := $(CFLAGS:-fPIC=)
|
|
# On Windows we need the shared library to be executable
|
|
else
|
|
# mingw?
|
|
-IS_MINGW := $(shell $(CC) --version | grep -i mingw | wc -l)
|
|
+IS_MINGW := $(shell $(CC) --version 2>/dev/null | grep -i mingw | wc -l)
|
|
ifeq ($(IS_MINGW),1)
|
|
EXT = dll
|
|
AR_EXT = lib
|
|
@@ -322,7 +322,7 @@ else
|
|
EXT = so
|
|
VERSION_EXT = $(EXT).$(API_MAJOR)
|
|
AR_EXT = a
|
|
-$(LIBNAME)_LDFLAGS += -Wl,-soname,lib$(LIBNAME).$(VERSION_EXT)
|
|
+#$(LIBNAME)_LDFLAGS += -Wl,-soname,lib$(LIBNAME).$(VERSION_EXT)
|
|
endif
|
|
endif
|
|
endif
|