Removed outdated build-scripts/iosbuild.sh Fixes #1532.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225
diff --git a/build-scripts/iosbuild.sh b/build-scripts/iosbuild.sh
deleted file mode 100755
index 143de7d..0000000
--- a/build-scripts/iosbuild.sh
+++ /dev/null
@@ -1,190 +0,0 @@
-#!/bin/sh
-#
-# Build a fat binary for iOS
-
-# Number of CPUs (for make -j)
-NCPU=`sysctl -n hw.ncpu`
-if test x$NJOB = x; then
- NJOB=$NCPU
-fi
-
-SRC_DIR=$(cd `dirname $0`/..; pwd)
-if [ "$PWD" = "$SRC_DIR" ]; then
- PREFIX=$SRC_DIR/ios-build
- if [ ! -d "$PREFIX" ]; then
- mkdir $PREFIX
- fi
-else
- PREFIX=$PWD
-fi
-
-BUILD_I386_IOSSIM=YES
-BUILD_X86_64_IOSSIM=YES
-
-BUILD_IOS_ARMV7=YES
-BUILD_IOS_ARMV7S=YES
-BUILD_IOS_ARM64=YES
-
-# 13.4.0 - Mavericks
-# 14.0.0 - Yosemite
-# 15.0.0 - El Capitan
-DARWIN=darwin15.0.0
-
-XCODEDIR=`xcode-select --print-path`
-IOS_SDK_VERSION=`xcrun --sdk iphoneos --show-sdk-version`
-MIN_SDK_VERSION=6.0
-
-IPHONEOS_PLATFORM=`xcrun --sdk iphoneos --show-sdk-platform-path`
-IPHONEOS_SYSROOT=`xcrun --sdk iphoneos --show-sdk-path`
-
-IPHONESIMULATOR_PLATFORM=`xcrun --sdk iphonesimulator --show-sdk-platform-path`
-IPHONESIMULATOR_SYSROOT=`xcrun --sdk iphonesimulator --show-sdk-path`
-
-# Uncomment if you want to see more information about each invocation
-# of clang as the builds proceed.
-# CLANG_VERBOSE="--verbose"
-
-CC=clang
-CXX=clang
-
-SILENCED_WARNINGS="-Wno-unused-local-typedef -Wno-unused-function"
-
-CFLAGS="${CLANG_VERBOSE} ${SILENCED_WARNINGS} -DNDEBUG -g -O0 -pipe -fPIC -fobjc-arc"
-
-echo "PREFIX ..................... ${PREFIX}"
-echo "BUILD_MACOSX_X86_64 ........ ${BUILD_MACOSX_X86_64}"
-echo "BUILD_I386_IOSSIM .......... ${BUILD_I386_IOSSIM}"
-echo "BUILD_X86_64_IOSSIM ........ ${BUILD_X86_64_IOSSIM}"
-echo "BUILD_IOS_ARMV7 ............ ${BUILD_IOS_ARMV7}"
-echo "BUILD_IOS_ARMV7S ........... ${BUILD_IOS_ARMV7S}"
-echo "BUILD_IOS_ARM64 ............ ${BUILD_IOS_ARM64}"
-echo "DARWIN ..................... ${DARWIN}"
-echo "XCODEDIR ................... ${XCODEDIR}"
-echo "IOS_SDK_VERSION ............ ${IOS_SDK_VERSION}"
-echo "MIN_SDK_VERSION ............ ${MIN_SDK_VERSION}"
-echo "IPHONEOS_PLATFORM .......... ${IPHONEOS_PLATFORM}"
-echo "IPHONEOS_SYSROOT ........... ${IPHONEOS_SYSROOT}"
-echo "IPHONESIMULATOR_PLATFORM ... ${IPHONESIMULATOR_PLATFORM}"
-echo "IPHONESIMULATOR_SYSROOT .... ${IPHONESIMULATOR_SYSROOT}"
-echo "CC ......................... ${CC}"
-echo "CFLAGS ..................... ${CFLAGS}"
-echo "CXX ........................ ${CXX}"
-echo "CXXFLAGS ................... ${CXXFLAGS}"
-echo "LDFLAGS .................... ${LDFLAGS}"
-
-###################################################################
-# This section contains the build commands for each of the
-# architectures that will be included in the universal binaries.
-###################################################################
-
-echo "$(tput setaf 2)"
-echo "###########################"
-echo "# i386 for iPhone Simulator"
-echo "###########################"
-echo "$(tput sgr0)"
-
-if [ "${BUILD_I386_IOSSIM}" == "YES" ]
-then
- (
- cd ${PREFIX}
- make clean
- ../configure --build=x86_64-apple-${DARWIN} --host=i386-ios-${DARWIN} --disable-shared --prefix=${PREFIX}/platform/i386-sim "CC=${CC}" "CFLAGS=${CFLAGS} -mios-simulator-version-min=${MIN_SDK_VERSION} -arch i386 -isysroot ${IPHONESIMULATOR_SYSROOT}" "CXX=${CXX}" "CXXFLAGS=${CXXFLAGS} -mios-simulator-version-min=${MIN_SDK_VERSION} -arch i386 -isysroot ${IPHONESIMULATOR_SYSROOT}" LDFLAGS="-arch i386 -mios-simulator-version-min=${MIN_SDK_VERSION} ${LDFLAGS} -L${IPHONESIMULATOR_SYSROOT}/usr/lib/ -L${IPHONESIMULATOR_SYSROOT}/usr/lib/system" || exit 2
- cp $SRC_DIR/include/SDL_config_iphoneos.h include/SDL_config.h
- make -j10 || exit 3
- make install
- ) || exit $?
-fi
-
-echo "$(tput setaf 2)"
-echo "#############################"
-echo "# x86_64 for iPhone Simulator"
-echo "#############################"
-echo "$(tput sgr0)"
-
-if [ "${BUILD_X86_64_IOSSIM}" == "YES" ]
-then
- (
- cd ${PREFIX}
- make clean
- ../configure --build=x86_64-apple-${DARWIN} --host=x86_64-ios-${DARWIN} --disable-shared --prefix=${PREFIX}/platform/x86_64-sim "CC=${CC}" "CFLAGS=${CFLAGS} -mios-simulator-version-min=${MIN_SDK_VERSION} -arch x86_64 -isysroot ${IPHONESIMULATOR_SYSROOT}" "CXX=${CXX}" "CXXFLAGS=${CXXFLAGS} -mios-simulator-version-min=${MIN_SDK_VERSION} -arch x86_64 -isysroot ${IPHONESIMULATOR_SYSROOT}" LDFLAGS="-arch x86_64 -mios-simulator-version-min=${MIN_SDK_VERSION} ${LDFLAGS} -L${IPHONESIMULATOR_SYSROOT}/usr/lib/ -L${IPHONESIMULATOR_SYSROOT}/usr/lib/system" || exit 2
- cp $SRC_DIR/include/SDL_config_iphoneos.h include/SDL_config.h
- make -j$NJOB || exit 3
- make install
- ) || exit $?
-fi
-
-echo "$(tput setaf 2)"
-echo "##################"
-echo "# armv7 for iPhone"
-echo "##################"
-echo "$(tput sgr0)"
-
-if [ "${BUILD_IOS_ARMV7}" == "YES" ]
-then
- (
- cd ${PREFIX}
- make clean
- ../configure --build=x86_64-apple-${DARWIN} --host=armv7-ios-${DARWIN} --disable-shared --prefix=${PREFIX}/platform/armv7-ios "CC=${CC}" "CFLAGS=${CFLAGS} -miphoneos-version-min=${MIN_SDK_VERSION} -arch armv7 -isysroot ${IPHONEOS_SYSROOT}" "CXX=${CXX}" "CXXFLAGS=${CXXFLAGS} -arch armv7 -isysroot ${IPHONEOS_SYSROOT}" LDFLAGS="-arch armv7 -miphoneos-version-min=${MIN_SDK_VERSION} ${LDFLAGS}" || exit 2
- cp $SRC_DIR/include/SDL_config_iphoneos.h include/SDL_config.h
- make -j$NJOB || exit 3
- make install
- ) || exit $?
-fi
-
-echo "$(tput setaf 2)"
-echo "###################"
-echo "# armv7s for iPhone"
-echo "###################"
-echo "$(tput sgr0)"
-
-if [ "${BUILD_IOS_ARMV7S}" == "YES" ]
-then
- (
- cd ${PREFIX}
- make clean
- ../configure --build=x86_64-apple-${DARWIN} --host=armv7s-ios-${DARWIN} --disable-shared --prefix=${PREFIX}/platform/armv7s-ios "CC=${CC}" "CFLAGS=${CFLAGS} -miphoneos-version-min=${MIN_SDK_VERSION} -arch armv7s -isysroot ${IPHONEOS_SYSROOT}" "CXX=${CXX}" "CXXFLAGS=${CXXFLAGS} -miphoneos-version-min=${MIN_SDK_VERSION} -arch armv7s -isysroot ${IPHONEOS_SYSROOT}" LDFLAGS="-arch armv7s -miphoneos-version-min=${MIN_SDK_VERSION} ${LDFLAGS}" || exit 2
- cp $SRC_DIR/include/SDL_config_iphoneos.h include/SDL_config.h
- make -j$NJOB || exit 3
- make install
- ) || exit $?
-fi
-
-echo "$(tput setaf 2)"
-echo "##################"
-echo "# arm64 for iPhone"
-echo "##################"
-echo "$(tput sgr0)"
-
-if [ "${BUILD_IOS_ARM64}" == "YES" ]
-then
- (
- cd ${PREFIX}
- make clean
- ../configure --build=x86_64-apple-${DARWIN} --host=arm-ios-${DARWIN} --disable-shared --prefix=${PREFIX}/platform/arm64-ios "CC=${CC}" "CFLAGS=${CFLAGS} -miphoneos-version-min=${MIN_SDK_VERSION} -arch arm64 -isysroot ${IPHONEOS_SYSROOT}" "CXX=${CXX}" "CXXFLAGS=${CXXFLAGS} -miphoneos-version-min=${MIN_SDK_VERSION} -arch arm64 -isysroot ${IPHONEOS_SYSROOT}" LDFLAGS="-arch arm64 -miphoneos-version-min=${MIN_SDK_VERSION} ${LDFLAGS}" || exit 2
- cp $SRC_DIR/include/SDL_config_iphoneos.h include/SDL_config.h
- make -j$NJOB || exit 3
- make install
- ) || exit $?
-fi
-
-echo "$(tput setaf 2)"
-echo "###################################################################"
-echo "# Create Universal Libraries and Finalize the packaging"
-echo "###################################################################"
-echo "$(tput sgr0)"
-
-(
- cd ${PREFIX}/platform
- mkdir -p universal
- lipo x86_64-sim/lib/libSDL2.a i386-sim/lib/libSDL2.a arm64-ios/lib/libSDL2.a armv7s-ios/lib/libSDL2.a armv7-ios/lib/libSDL2.a -create -output universal/libSDL2.a
-)
-
-(
- cd ${PREFIX}
- mkdir -p lib
- cp -r platform/universal/* lib
- #rm -rf platform
- lipo -info lib/libSDL2.a
-)
-
-echo Done!
diff --git a/docs/README-ios.md b/docs/README-ios.md
index ee039de..242869b 100644
--- a/docs/README-ios.md
+++ b/docs/README-ios.md
@@ -23,21 +23,9 @@ There are three build targets:
Build SDL for iOS from the command line
==============================================================================
-1. cd (PATH WHERE THE SDL CODE IS)/build-scripts
-2. ./iosbuild.sh
-
-If everything goes fine, you should see a build/ios directory, inside there's
-two directories "lib" and "include".
-"include" contains a copy of the SDL headers that you'll need for your project,
-make sure to configure XCode to look for headers there.
-"lib" contains find two files, libSDL2.a and libSDL2main.a, you have to add both
-to your XCode project. These libraries contain three architectures in them,
-armv6 for legacy devices, armv7, and i386 (for the simulator).
-By default, iosbuild.sh will autodetect the SDK version you have installed using
-xcodebuild -showsdks, and build for iOS >= 3.0, you can override this behaviour
-by setting the MIN_OS_VERSION variable, ie:
-
-MIN_OS_VERSION=4.2 ./iosbuild.sh
+1. cd (PATH WHERE THE SDL CODE IS)
+2. xcodebuild -project Xcode/SDL/SDL.xcodeproj -target 'Static Library-iOS' -configuration Release -sdk iphoneos13.2 clean build
+
Using the Simple DirectMedia Layer for iOS
==============================================================================