x264编译

armeabi-v7a

#!/bin/bash
export NDK=F:/Android/Sdk/ndk-bundle # your android ndk folder
export HOST_TAG=windows-x86_64 # adjust to your building host
export TOOLCHAIN=$NDK/toolchains/llvm/prebuilt/$HOST_TAG

export CC=$TOOLCHAIN/bin/armv7a-linux-androideabi18-clang # c compiler path
export CXX=$TOOLCHAIN/bin/armv7a-linux-androideabi18-clang++ # c++ compiler path

function build_armeabi-v7a
{
  ./configure \
  --prefix=./android/armeabi-v7a \
  --enable-static \
  --enable-pic \
  --disable-asm \
  --disable-opencl \
  --disable-cli \
  --host=arm-linux \
  --cross-prefix=$TOOLCHAIN/bin/arm-linux-androideabi- \
  --sysroot=$TOOLCHAIN/sysroot \

  make clean
  make
  make install
}

build_armeabi-v7a
echo build_armeabi-v7a finished

arm64-v8a

#!/bin/bash
export NDK=F:/Android/Sdk/ndk-bundle
export HOST_TAG=windows-x86_64 # adjust to your building host
export TOOLCHAIN=$NDK/toolchains/llvm/prebuilt/$HOST_TAG

export CC=$TOOLCHAIN/bin/aarch64-linux-android21-clang
export CXX=$TOOLCHAIN/bin/aarch64-linux-android21-clang++

function build_arm64-v8a
{
  ./configure \
  --prefix=./android/arm64-v8a \
  --enable-static \
  --enable-pic \
  --disable-asm \
  --disable-opencl \
  --disable-cli \
  --host=aarch64-linux \
  --cross-prefix=$TOOLCHAIN/bin/aarch64-linux-android- \
  --sysroot=$TOOLCHAIN/sysroot \

  make clean
  make
  make install
}

build_arm64-v8a
echo build_arm64-v8a finished

x86

#!/bin/bash
export NDK=F:/Android/Sdk/ndk-bundle
export HOST_TAG=windows-x86_64 # adjust to your building host
export TOOLCHAIN=$NDK/toolchains/llvm/prebuilt/$HOST_TAG

export CC=$TOOLCHAIN/bin/i686-linux-android18-clang
export CXX=$TOOLCHAIN/bin/i686-linux-android18-clang++

function build_x86
{
  ./configure \
  --prefix=./android/x86 \
  --enable-static \
  --enable-pic \
  --disable-asm \
  --disable-opencl \
  --disable-cli \
  --host=i686-linux \
  --cross-prefix=$TOOLCHAIN/bin/i686-linux-android- \
  --sysroot=$TOOLCHAIN/sysroot \

  make clean
  make
  make install
}

build_x86
echo build_x86 finished

x86_64

#!/bin/bash
export NDK=F:/Android/Sdk/ndk-bundle
export HOST_TAG=windows-x86_64 # adjust to your building host
export TOOLCHAIN=$NDK/toolchains/llvm/prebuilt/$HOST_TAG

export CC=$TOOLCHAIN/bin/x86_64-linux-android21-clang
export CXX=$TOOLCHAIN/bin/x86_64-linux-android21-clang++

function build_x86_64
{
  ./configure \
  --prefix=./android/x86_64 \
  --enable-static \
  --enable-pic \
  --disable-asm \
  --disable-opencl \
  --disable-cli \
  --host=x86_64-linux \
  --cross-prefix=$TOOLCHAIN/bin/x86_64-linux-android- \
  --sysroot=$TOOLCHAIN/sysroot \

  make clean
  make
  make install
}

build_x86_64
echo build_x86_64 finished

你可能感兴趣的:(Android,x264)