From e6b8510dcee2a878ddc35a02d7236def8b153e40 Mon Sep 17 00:00:00 2001 From: xufulong <839789740@qq.com> Date: Fri, 27 Dec 2019 01:34:59 +0800 Subject: [PATCH] =?UTF-8?q?x264=E7=9A=84=E7=BC=96=E8=AF=91=E8=84=9A?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit x264的编译脚本 --- shell/x264/build_x264.sh | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 shell/x264/build_x264.sh diff --git a/shell/x264/build_x264.sh b/shell/x264/build_x264.sh new file mode 100644 index 0000000..a47f91d --- /dev/null +++ b/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