ndk 编译 x264

 

需要 感谢博主  https://blog.csdn.net/Redmoon955331/article/details/122876400

{


!/bin/bash
echo ".............compile"
export NDK=/home/yfk/pripro/Android/android-ndk-r10e
export SYSROOT=$NDK/platforms/android-9/arch-arm/
export TOOLCHAIN=$NDK/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64
export CPU=arm
export PREFIX=/home/yfk/pripro/D/library/x264-master/libs/$CPU
export ADDI_CFLAGS="-marm -march=armv7-a"
./configure --host=arm-linux \
--prefix=$PREFIX \
--enable-shared \
--enable-static \
--enable-pic \
--disable-cli \
--disable-win32thread \
--cross-prefix=$TOOLCHAIN/bin/arm-linux-androideabi- \
--sysroot=$SYSROOT \
--extra-cflags="-Os -fPIC $ADDI_CFLAGS" \
--extra-ldflags="$ADDI_CFLAGS" \
$ADDITIONAL_CONFIGURE_FLAG

echo "configure over"
make clean
echo ".............building  over"


}

    elif [ "$SYS" = "SunOS" ]; then
        echo "SOSUFFIX=so" >> config.mak
        echo "SONAME=libx264.so" >> config.mak
        echo "SOFLAGS=-shared -Wl,-h,\$(SONAME) $SOFLAGS" >> config.mak
    else
        echo "SOSUFFIX=so" >> config.mak
        echo "SONAME=libx264.so" >> config.mak
        echo "SOFLAGS=-shared -Wl,-soname,\$(SONAME) $SOFLAGS" >> config.mak
    fi

 

 

ok

 

posted @ 2023-04-20 20:19  YZFHKMS-X  阅读(54)  评论(0编辑  收藏  举报