(iOS/Theos) Have it still work for OSX

This commit is contained in:
Twinaphex 2014-11-09 18:35:56 +01:00
parent 8441d46b10
commit 54ca78fef7

View File

@ -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