x264的编译脚本

x264的编译脚本
pull/107/head
xufulong 5 years ago
parent 0117bf97e5
commit e6b8510dce
  1. 39
      shell/x264/build_x264.sh

@ -0,0 +1,39 @@
#!/bin/bash
archbit=64
if [ $archbit -eq 32 ];then
echo "build for 32bit"
#32bit
ABI='armeabi-v7a'
CPU='arm'
ARCH='arm'
ANDROID='androideabi'
else
#64bit
echo "build for 64bit"
ABI='arm64-v8a'
CPU='aarch64'
ARCH='arm64'
ANDROID='android'
fi
export NDK=/home/frank/android/android-ndk-r10e
export PREBUILT=$NDK/toolchains/$CPU-linux-$ANDROID-4.9/prebuilt
export PLATFORM=$NDK/platforms/android-21/arch-$ARCH
export TOOLCHAIN=$PREBUILT/linux-x86_64
export PREFIX=$(pwd)/android/$ABI
build_x264(){
./configure \
--prefix=$PREFIX \
--enable-static \
--disable-asm \
--enable-pic \
--host=arm-linux \
--cross-prefix=$TOOLCHAIN/bin/$CPU-linux-$ANDROID- \
--sysroot=$PLATFORM \
make clean
make
make install
}
build_x264
Loading…
Cancel
Save