# Requirements for both iOS and Android:

For x86 builds, you will need yasm installed on your machine.

On MacOSX, you can install it using MacPorts.
First, install MacPorts: https://www.macports.org/install.php
Then: sudo port install yasm

On Linux, it should be available for most distributions as a packet.
On Ubuntu for instance: sudo apt-get install yasm


#-------------------------------------------------------------------------------
# To build for iOS:

./build_ios.sh

It requires xCode + command line tools, version 6.4 (iOS 8.4) installed in default directory.


#-------------------------------------------------------------------------------
# To build the Android FFmpeg libraries:

  - you need a x86_64 machine running a Linux distribution; this
    release has been tested on Ubuntu 14.04.

  - create a working directory:

        mkdir FCD
        cd FCD

  - get the Android NDK; this release has been tested with
    the NDK r10d :
        https://developer.android.com/ndk/downloads/index.html
        http://dl.google.com/android/ndk/android-ndk-r10d-linux-x86_64.bin

  - extract the NDK :
        7z x android-ndk-r10d-linux-x86_64.bin

    This will create a directory named 'android-ndk-r10d'. Set an
    environment variable pointing to that directory:

        export ANDROID_NDK_ROOT=$(pwd)/android-ndk-r10d

  - prepare the toolchains:
        mkdir -p toolchains/android-arm-14
        mkdir -p toolchains/android-x86-14

        export ANDROID_TOOLCHAIN_ROOT=$(pwd)/toolchains

        cd android-ndk-r10d/build/tools
        ./make-standalone-toolchain.sh \
            --arch=arm \
            --platform=android-14 \
            --install-dir=${ANDROID_TOOLCHAIN_ROOT}/android-arm-14 \
            --ndk-dir=${ANDROID_NDK_ROOT} \
            --system=linux-x86_64
        ./make-standalone-toolchain.sh \
            --arch=x86 \
            --platform=android-14 \
            --install-dir=${ANDROID_TOOLCHAIN_ROOT}/android-x86-14 \
            --ndk-dir=${ANDROID_NDK_ROOT} \
            --system=linux-x86_64

  - cd back to the directory with the ffmpeg sources, and launch the
    Android build:

        ./build_android.sh

  - the resulting libraries will be located in:
        builds/android/

    there will be one sub-directory for each architecture variants:
        builds/android/armv6/
        builds/android/armv7-a/
        builds/android/x86/
