faac编译

faac可以到这里获取: http://www.audiocoding.com/downloads.html

工程中默认保护vs的编译;

在Windows上比较方法;


在Android上编译;

export NDK_VERSION=4.8
export NDK_PLATFORM=android-15


export NDK=android-ndk-r10e-64
export PLATFORM=$NDK/platforms/$NDK_PLATFORM/arch-arm 
export PREBUILT=$NDK/toolchains/arm-linux-androideabi-$NDK_VERSION/prebuilt


#TOOLCHAINS_ROOT=$NDK/toolchains/arm-linux-androideabi-$NDK_VERSION/prebuilt/linux-x86_64
#export CC="$TOOLCHAINS_ROOT/bin/arm-linux-androideabi-gcc --sysroot=$PLATFORM" #没有--sysroot,出现crtbegin_so.a找不到
#export CXX="$TOOLCHAINS_ROOT/bin/arm-linux-androideabi-g++ --sysroot=$PLATFORM"
#export CFLAGS="-I$TOOLCHAINS_INCLUDE -I$PLATFORM_INCLUDE -I$NDK/sources/cxx-stl/gnu-libstdc++/4.8/include -I$NDK/sources/cxx-stl/stlport/stlport"


PREFIX=D:/aac_out


CFLAGS="-fpic -DANDROID -fpic -mthumb-interwork -ffunction-sections -funwind-tables -fstack-protector -fno-short-enums -D__ARM_ARCH_5__ -D__ARM_ARCH_5T__ -D__ARM_ARCH_5E__ -D__ARM_ARCH_5TE__ -Wno-psabi -march=armv5te -mtune=xscale -msoft-float -mthumb -Os -fomit-frame-pointer -fno-strict-aliasing -finline-limit=64 -DANDROID -Wa,--noexecstack -MMD -MP "
#FLAGS="--host=arm-androideabi-linux --enable-static --disable-shared --prefix=$HOME --enable-armv5e "
CROSS_COMPILE=$PREBUILT/windows-x86_64/bin/arm-linux-androideabi-
export CPPFLAGS="$CFLAGS"
export CFLAGS="$CFLAGS"
export CXXFLAGS="$CFLAGS"
export CXX="${CROSS_COMPILE}g++ --sysroot=${PLATFORM}"
export LDFLAGS="$LDFLAGS"
export CC="${CROSS_COMPILE}gcc --sysroot=${PLATFORM}"
export NM="${CROSS_COMPILE}nm"
export STRIP="${CROSS_COMPILE}strip"
export RANLIB="${CROSS_COMPILE}ranlib"
export AR="${CROSS_COMPILE}ar"


./configure --host=arm-linux \
--disable-dependency-tracking \
--enable-shared \
--enable-static \
--with-pic \
--without-mp4v2

你可能感兴趣的:(faac编译)