From 8bc8a818e4d182273fe10f736a92c1892ca57984 Mon Sep 17 00:00:00 2001 From: Vaughn Dice Date: Mon, 26 Mar 2012 11:12:07 -0600 Subject: [PATCH] Use latest iOS SDK found on local machine --- makefile | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/makefile b/makefile index 9408df6d9c..5bfcd04ca9 100755 --- a/makefile +++ b/makefile @@ -320,12 +320,24 @@ ifeq ($(platform),darwin) so-suffix = .dylib shared = -dynamiclib + sdk-dir = $(developer-dir)/Platforms/iPhoneOS.platform/Developer/SDKs + + ios-version := $(shell if test -d $(sdk-dir)/iPhoneOS5.1.sdk; then echo 5.1; \ + elif test -d $(sdk-dir)/iPhoneOS5.0.sdk; then echo 5.0; \ + elif test -d $(sdk-dir)/iPhoneOS4.3.sdk; then echo 4.3; \ + elif test -d $(sdk-dir)/iPhoneOS4.2.sdk; then echo 4.2; \ + else echo; fi) + + ifeq ($(ios-version),) + x := $(error "couldn't find SDK for iOS version") + endif + ifeq ($(arch),arm) ifeq ($(build-arch),powerpc) converter-cflags += -DOPPOSITE_ENDIAN endif flags = -arch armv7 -isysroot \ - $(developer-dir)/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk/ + $(sdk-dir)/iPhoneOS$(ios-version).sdk/ openjdk-extra-cflags += $(flags) cflags += $(flags) asmflags += $(flags)