mirror of
https://gitlab.com/qemu-project/capstone.git
synced 2025-09-17 02:01:15 +08:00
11
Makefile
11
Makefile
@ -53,9 +53,6 @@ CFLAGS += -mmacosx-version-min=10.5 \
|
|||||||
-fno-builtin
|
-fno-builtin
|
||||||
endif
|
endif
|
||||||
|
|
||||||
CFLAGS += $(foreach arch,$(LIBARCHS),-arch $(arch))
|
|
||||||
LDFLAGS += $(foreach arch,$(LIBARCHS),-arch $(arch))
|
|
||||||
|
|
||||||
PREFIX ?= /usr
|
PREFIX ?= /usr
|
||||||
DESTDIR ?=
|
DESTDIR ?=
|
||||||
ifndef BUILDDIR
|
ifndef BUILDDIR
|
||||||
@ -259,6 +256,12 @@ VERSION_EXT =
|
|||||||
|
|
||||||
IS_APPLE := $(shell $(CC) -dM -E - < /dev/null | grep -cm 1 -e __apple_build_version__ -e __APPLE_CC__)
|
IS_APPLE := $(shell $(CC) -dM -E - < /dev/null | grep -cm 1 -e __apple_build_version__ -e __APPLE_CC__)
|
||||||
ifeq ($(IS_APPLE),1)
|
ifeq ($(IS_APPLE),1)
|
||||||
|
# on MacOS, compile in Universal format by default
|
||||||
|
MACOS_UNIVERSAL ?= yes
|
||||||
|
ifeq ($(MACOS_UNIVERSAL),yes)
|
||||||
|
CFLAGS += $(foreach arch,$(LIBARCHS),-arch $(arch))
|
||||||
|
LDFLAGS += $(foreach arch,$(LIBARCHS),-arch $(arch))
|
||||||
|
endif
|
||||||
EXT = dylib
|
EXT = dylib
|
||||||
VERSION_EXT = $(API_MAJOR).$(EXT)
|
VERSION_EXT = $(API_MAJOR).$(EXT)
|
||||||
$(LIBNAME)_LDFLAGS += -dynamiclib -install_name lib$(LIBNAME).$(VERSION_EXT) -current_version $(PKG_MAJOR).$(PKG_MINOR).$(PKG_EXTRA) -compatibility_version $(PKG_MAJOR).$(PKG_MINOR)
|
$(LIBNAME)_LDFLAGS += -dynamiclib -install_name lib$(LIBNAME).$(VERSION_EXT) -current_version $(PKG_MAJOR).$(PKG_MINOR).$(PKG_EXTRA) -compatibility_version $(PKG_MAJOR).$(PKG_MINOR)
|
||||||
@ -272,6 +275,8 @@ CFLAGS += -D_FORTIFY_SOURCE=0
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
else
|
else
|
||||||
|
CFLAGS += $(foreach arch,$(LIBARCHS),-arch $(arch))
|
||||||
|
LDFLAGS += $(foreach arch,$(LIBARCHS),-arch $(arch))
|
||||||
$(LIBNAME)_LDFLAGS += -shared
|
$(LIBNAME)_LDFLAGS += -shared
|
||||||
# Cygwin?
|
# Cygwin?
|
||||||
IS_CYGWIN := $(shell $(CC) -dumpmachine | grep -i cygwin | wc -l)
|
IS_CYGWIN := $(shell $(CC) -dumpmachine | grep -i cygwin | wc -l)
|
||||||
|
3
make.sh
3
make.sh
@ -165,5 +165,6 @@ case "$TARGET" in
|
|||||||
"ios_armv7s" ) build_iOS armv7s $*;;
|
"ios_armv7s" ) build_iOS armv7s $*;;
|
||||||
"ios_arm64" ) build_iOS arm64 $*;;
|
"ios_arm64" ) build_iOS arm64 $*;;
|
||||||
"osx-kernel" ) CAPSTONE_USE_SYS_DYN_MEM=yes CAPSTONE_HAS_OSXKERNEL=yes CAPSTONE_ARCHS=x86 CAPSTONE_SHARED=no CAPSTONE_BUILD_CORE_ONLY=yes build $*;;
|
"osx-kernel" ) CAPSTONE_USE_SYS_DYN_MEM=yes CAPSTONE_HAS_OSXKERNEL=yes CAPSTONE_ARCHS=x86 CAPSTONE_SHARED=no CAPSTONE_BUILD_CORE_ONLY=yes build $*;;
|
||||||
* ) echo "Usage: make.sh [nix32|cross-win32|cross-win64|cygwin-mingw32|cygwin-mingw64|ios|ios_armv7|ios_armv7s|ios_arm64|cross-android arm|cross-android arm64|clang|gcc|install|uninstall]"; exit 1;;
|
"mac-universal-no" ) MACOS_UNIVERSAL=no ${MAKE} $*;;
|
||||||
|
* ) echo "Usage: make.sh [nix32|cross-win32|cross-win64|cygwin-mingw32|cygwin-mingw64|ios|ios_armv7|ios_armv7s|ios_arm64|cross-android arm|cross-android arm64|clang|gcc|install|uninstall|mac-universal-no]"; exit 1;;
|
||||||
esac
|
esac
|
||||||
|
Reference in New Issue
Block a user