diff --git a/apple/iOS/Makefile b/apple/iOS/Makefile index 39639d1259..181d0fd971 100644 --- a/apple/iOS/Makefile +++ b/apple/iOS/Makefile @@ -1,6 +1,27 @@ +ifeq ($(platform),) + platform = unix + ifeq ($(shell uname -a),) + platform = win + else ifneq ($(findstring Darwin,$(shell uname -a)),) + platform = osx + arch = intel + ifeq ($(shell uname -p),powerpc) + arch = ppc + endif + else ifneq ($(findstring MINGW,$(shell uname -a)),) + platform = win + else ifneq ($(findstring win,$(shell uname -a)),) + platform = win + endif +endif + +ifeq ($(platform), osx) +_LATEST_SDK := $(shell xcrun -sdk iphoneos -show-sdk-version) +else _SDK_DIR := $(THEOS)/sdks _IOS_SDKS := $(sort $(patsubst $(_SDK_DIR)/iPhoneOS%.sdk,%,$(wildcard $(_SDK_DIR)/iPhoneOS*.sdk))) _LATEST_SDK := $(word $(words $(_IOS_SDKS)),$(_IOS_SDKS)) +endif SDKVERSION := $(_LATEST_SDK) ARCHS = armv7 armv7s