diff --git a/libretro-build-ios9.sh b/libretro-build-ios9.sh new file mode 100755 index 00000000..95ad1d1a --- /dev/null +++ b/libretro-build-ios9.sh @@ -0,0 +1,17 @@ +#! /usr/bin/env bash +# vim: set ts=3 sw=3 noet ft=sh : bash + +SCRIPT="${0#./}" +BASE_DIR="${SCRIPT%/*}" +WORKDIR="$PWD" + +if [ "$BASE_DIR" = "$SCRIPT" ]; then + BASE_DIR="$WORKDIR" +else + if [[ "$0" != /* ]]; then + # Make the path absolute + BASE_DIR="$WORKDIR/$BASE_DIR" + fi +fi + +platform=ios9 ${BASE_DIR}/libretro-build.sh $@ diff --git a/libretro-build.sh b/libretro-build.sh index bea35899..2558fcf3 100755 --- a/libretro-build.sh +++ b/libretro-build.sh @@ -76,10 +76,6 @@ fi FORMAT_COMPILER_TARGET_ALT=$FORMAT_COMPILER_TARGET -if [ "$FORMAT_COMPILER_TARGET" = "ios" ]; then - echo "iOS path: ${IOSSDK}" - echo "iOS version: ${IOSVER}" -fi echo "CC = $CC" echo "CXX = $CXX" echo "CXX11 = $CXX11" @@ -262,7 +258,7 @@ build_default_cores() { libretro_build_core pcsx_rearmed fi - if [ $platform != "ios" ]; then + if [ $platform != "ios" ] || [ $platform != "ios9" ]; then # Would need ffmpeg libraries baked in libretro_build_core ffmpeg libretro_build_core ppsspp diff --git a/libretro-config.sh b/libretro-config.sh index 7975541d..132e4da1 100755 --- a/libretro-config.sh +++ b/libretro-config.sh @@ -35,6 +35,29 @@ case "$platform" in CXX11="clang++ -std=c++11 -stdlib=libc++ -arch armv7 -marm -miphoneos-version-min=5.0 -isysroot $IOSSDK" ;; + ios9) + # NOTE: This config requires a Mac with an Xcode installation. These + # scripts will work at least as far as 10.5 that we're sure of, but + # we build with clang targeting iOS >= 5. We'll accept patches for + # older versions of iOS. + + DIST_DIR="ios9" + FORMAT_EXT=dylib + IOS=1 + ARCH=armv7 + FORMAT=_ios9 + FORMAT_COMPILER_TARGET=ios9 + FORMAT_COMPILER_TARGET_ALT=ios9 + export IOSSDK=$(xcodebuild -version -sdk iphoneos Path) + MIN_IOS5="-miphoneos-version-min=5.0" + MIN_IOS7="-miphoneos-version-min=7.0" + + # Use generic names rather than gcc/clang to better support both + CC="cc -arch armv7 -marm -miphoneos-version-min=8.0 -isysroot $IOSSDK" + CXX="c++ -arch armv7 -marm -miphoneos-version-min=8.0 -isysroot $IOSSDK" + CXX11="clang++ -std=c++11 -stdlib=libc++ -arch armv7 -marm -miphoneos-version-min=8.0 -isysroot $IOSSDK" + ;; + android-x86_64) FORMAT_ABI="x86_64" DIST_DIR="android/${FORMAT_ABI}"