Skip to content

Commit

Permalink
Add iOS9 script
Browse files Browse the repository at this point in the history
  • Loading branch information
inactive123 committed Oct 15, 2015
1 parent d46e2f2 commit dc07d40
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 5 deletions.
17 changes: 17 additions & 0 deletions libretro-build-ios9.sh
Original file line number Diff line number Diff line change
@@ -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 $@
6 changes: 1 addition & 5 deletions libretro-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand Down
23 changes: 23 additions & 0 deletions libretro-config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down

0 comments on commit dc07d40

Please sign in to comment.