Makefile: Improve Apple detection (#2263)

* Makefile: Improve Apple detection

__APPLE__ is always defined & set to 1 on Darwin.

* HACK.TXT: wording
This commit is contained in:
Sevan Janiyan 2024-02-23 05:18:53 +00:00 committed by GitHub
parent 215eae8e54
commit 1c238b6491
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -38,7 +38,7 @@ Capstone source is organized as followings.
└── xcode <- Xcode support (for MacOSX compile)
Follow instructions in COMPILE.TXT for how to compile and run test code.
Follow the instructions in COMPILE.TXT for how to compile and run test code.
Note: if you find some strange bugs, it is recommended to firstly clean
the code and try to recompile/reinstall again. This can be done with:

View File

@ -354,7 +354,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 2> /dev/null | grep __apple_build_version__ | wc -l | tr -d " ")
IS_APPLE := $(shell $(CC) -dM -E - < /dev/null 2> /dev/null | grep __APPLE__ | wc -l | tr -d " ")
ifeq ($(IS_APPLE),1)
# on MacOS, do not build in Universal format by default
MACOS_UNIVERSAL ?= no