summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJay Freeman (saurik) <saurik@saurik.com>2010-12-02 02:56:31 -0800
committerJay Freeman (saurik) <saurik@saurik.com>2010-12-02 03:48:55 -0800
commit0263db76b03034fba9c0a7e3ce993352ad3966fe (patch)
treebae3469f9127fe2da4891d19123171b6fbf01bf5
parent01cf729280ca5e3c515af590547404634a26b414 (diff)
Automatically use gcc 4.0 to target iOS 2.0, if available.
-rw-r--r--makefile12
1 files changed, 7 insertions, 5 deletions
diff --git a/makefile b/makefile
index 168a74f..d932617 100644
--- a/makefile
+++ b/makefile
@@ -1,9 +1,11 @@
-ifeq (o,O)
-ios := 2.0
-gcc := 4.0
-else
+sdks := /Developer/Platforms/iPhoneOS.platform/Developer/SDKs
+
+ifeq ($(findstring iPhoneOS2.0.sdk,$(wildcard $(sdks)/iPhoneOS*.sdk)),)
ios := 3.2
gcc := 4.2
+else
+ios := 2.0
+gcc := 4.0
endif
flags :=
@@ -12,7 +14,7 @@ link :=
#dpkg := /Library/Cydia/bin/dpkg-deb -Zlzma
dpkg := dpkg-deb
-sdk := /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS$(ios).sdk
+sdk := $(sdks)/iPhoneOS$(ios).sdk
flags += -F$(sdk)/System/Library/PrivateFrameworks
flags += -I. -isystem sysroot/usr/include -Lsysroot/usr/lib