Update the instructions for configuring a build for iOS

Message ID 1395863828-4936-1-git-send-email-martin@martin.st
State Committed
Headers show

Commit Message

Martin Storsjö March 26, 2014, 7:57 p.m.
The previous instructions were woefully outdated.
---
Using xcrun to find the currently installed SDK path, mentioning
iOS instead of explicitly saying e.g. iPhone 3gs.
---
 README | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

Comments

Janne Grunau March 26, 2014, 9:09 p.m. | #1
On 2014-03-26 21:57:08 +0200, Martin Storsjö wrote:
> The previous instructions were woefully outdated.
> ---
> Using xcrun to find the currently installed SDK path, mentioning
> iOS instead of explicitly saying e.g. iPhone 3gs.
> ---
>  README | 9 ++-------
>  1 file changed, 2 insertions(+), 7 deletions(-)
> 
> diff --git a/README b/README
> index d903ba1..9057332 100644
> --- a/README
> +++ b/README
> @@ -1,13 +1,8 @@
> -To configure ffmpeg for the iPhone 3gs and iPod touch 3g:
> +To configure Libav for iOS:
>  
> -./configure --enable-cross-compile --arch=arm --target-os=darwin --cc='/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc -arch armv7' --sysroot=/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk --cpu=cortex-a8 --enable-pic
> -
> -To configure ffmpeg for all other iPhones and iPods:
> -
> -./configure --enable-cross-compile --arch=arm --target-os=darwin --cc='/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc -arch armv6' --sysroot=/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk --cpu=arm1176jzf-s
> +./configure --enable-cross-compile --arch=arm --target-os=darwin --cc='clang -arch armv7' --sysroot=$(xcrun -sdk iphoneos --show-sdk-path) --cpu=cortex-a8 --enable-pic

missing one dash for --sdk in '$(xcrun -sdk iphoneos --show-sdk-path)',
probably safer to enclose it in quotes in the case someone install Xcode
in a path with spaces

Otherwise ok

Janne

Patch

diff --git a/README b/README
index d903ba1..9057332 100644
--- a/README
+++ b/README
@@ -1,13 +1,8 @@ 
-To configure ffmpeg for the iPhone 3gs and iPod touch 3g:
+To configure Libav for iOS:
 
-./configure --enable-cross-compile --arch=arm --target-os=darwin --cc='/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc -arch armv7' --sysroot=/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk --cpu=cortex-a8 --enable-pic
-
-To configure ffmpeg for all other iPhones and iPods:
-
-./configure --enable-cross-compile --arch=arm --target-os=darwin --cc='/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc -arch armv6' --sysroot=/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk --cpu=arm1176jzf-s
+./configure --enable-cross-compile --arch=arm --target-os=darwin --cc='clang -arch armv7' --sysroot=$(xcrun -sdk iphoneos --show-sdk-path) --cpu=cortex-a8 --enable-pic
 
 Make sure to replace the iPhone SDK version with the version that you're using.
-Pre-3.0 versions aren't supported and probably won't work.
 
 If deploying to all generations, it's recommended to do separate out-of-tree
 builds for each architecture, then lipo together the resulting libs. For