radare2/mk/darwin.mk
Khairul Azhar Kasmiran 7e744440a6
Fix build on XCode12 in Github CI (#17879) ##build
* Blindfix the macos build based on the Xcode Wikipedia page
2020-11-01 01:40:26 +01:00

23 lines
474 B
Makefile

ifeq ($(OSTYPE),darwin)
ARCH=$(shell uname -m)
XCODE_VERSION=$(shell xcodebuild -version|grep Xcode|grep -o "[\.0-9]\+")
XCODE_VERSION_MAJOR=$(word 1, $(subst ., ,$(XCODE_VERSION)))
ifeq ($(COMPILER),ios-sdk)
IOS_VERSION="9.0"
IOS_SDK_VERSION="9.0"
else
ifeq ($(shell test $(XCODE_VERSION_MAJOR) -gt 10;echo $$?),0)
MACOS_VERSION="10.5"
MACOS_SDK_VERSION="10.5"
PARTIALLD+=-arch ${ARCH} -platform_version macos $(MACOS_VERSION) $(MACOS_SDK_VERSION)
endif
endif
endif