ref: 2ca8ef4bd3a94e0589260260e3fa2b488ada489f
parent: 3238c913cc1ed0cc52a2d5dce5d2eed41d2fed3e
author: Martin Storsjö <[email protected]>
date: Wed Mar 19 06:31:34 EDT 2014
Automatically pick the latest installed iOS SDK when building with make This avoids having to update the makefile just to change the SDK version whenever the iOS SDK is updated (since the previous version is removed on updates).
--- a/build/platform-ios.mk
+++ b/build/platform-ios.mk
@@ -2,12 +2,12 @@
include build/platform-darwin.mk
CXX = clang++
CC = clang
-SDK = 7.0
ifneq ($(filter %86 x86_64, $(ARCH)),)
SDKTYPE = iPhoneSimulator
else
SDKTYPE = iPhoneOS
endif
+SDK = $(shell xcrun --sdk $(shell echo $(SDKTYPE) | tr A-Z a-z) --show-sdk-version)
SDK_MIN = 5.1
SDKROOT = /Applications/Xcode.app/Contents/Developer/Platforms/$(SDKTYPE).platform/Developer/SDKs/$(SDKTYPE)$(SDK).sdk