+if "${ios}"; then
+
+out=ios
+sudo xcode-select --switch /Applications/Xcode-4.6.3.app
+flags=(cycc -- -miphoneos-version-min=2.0 -arch armv6)
+
+else
+
+out=out
+sudo xcode-select --switch /Applications/Xcode-5.1.1.app
+
+if which xcrun &>/dev/null; then
+ flags=(xcrun -sdk macosx g++)
+ flags+=(-mmacosx-version-min=10.4)
+
+ for arch in i386 x86_64; do