NDK=/Users/xxxxx/work/tools/android_sdk/ndk-bundle
ARM_PLATFORM=$NDK/platforms/android-9/arch-arm/
ARM_PREBUILT=$NDK/toolchains/arm-linux-androideabi-4.8/prebuilt/darwin-x86_64
ARM64_PLATFORM=$NDK/platforms/android-21/arch-arm64/
ARM64_PREBUILT=$NDK/toolchains/aarch64-linux-android-4.9/prebuilt/darwin-x86_64
X86_PLATFORM=$NDK/platforms/android-9/arch-x86/
X86_PREBUILT=$NDK/toolchains/x86-4.9/prebuilt/darwin-x86_64
X86_64_PLATFORM=$NDK/platforms/android-21/arch-x86_64/
X86_64_PREBUILT=$NDK/toolchains/x86_64-4.9/prebuilt/darwin-x86_64
MIPS_PLATFORM=$NDK/platforms/android-9/arch-mips/
MIPS_PREBUILT=$NDK/toolchains/mipsel-linux-android-4.8/prebuilt/darwin-x86_64
function build_one
{
if [ $ARCH == "arm" ]
then
PLATFORM=$ARM_PLATFORM
PREBUILT=$ARM_PREBUILT
HOST=arm-linux-androideabi
#added by alexvas
elif [ $ARCH == "arm64" ]
then
PLATFORM=$ARM64_PLATFORM
PREBUILT=$ARM64_PREBUILT
HOST=aarch64-linux-android
elif [ $ARCH == "mips" ]
then
PLATFORM=$MIPS_PLATFORM
PREBUILT=$MIPS_PREBUILT
HOST=mipsel-linux-android
#alexvas
elif [ $ARCH == "x86_64" ]
then
PLATFORM=$X86_64_PLATFORM
PREBUILT=$X86_64_PREBUILT
HOST=x86_64-linux-android
else
PLATFORM=$X86_PLATFORM
PREBUILT=$X86_PREBUILT
HOST=i686-linux-android
fi
./configure --prefix=$PREFIX \
--enable-static \
--enable-pic \
--disable-cli \
--host=$HOST \
--cross-prefix=$PREBUILT/bin/$HOST- \
--sysroot=$PLATFORM
make
make install
}
ARCH=arm
CPU=arm
PREFIX=$(pwd)/../android-x264/$CPU
build_one
Android x264编译
©著作权归作者所有,转载或内容合作请联系作者
- 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
- 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
- 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
推荐阅读更多精彩内容
- 一,获取x264源码 使用git下载: git clone http://git.videolan.org/git...
- 设置编译参数``--debug --info发现还是这些东西,实际上android.support.annotat...
- 目前在学习kotlin,在Android Studio 3.0中引入最新版本的Anko 编译会出现如下错误Erro...