编译流程如下:
1.到官网下载4.0的版本,并解压
2.编写编译脚本,如下
#!/bin/shexport NDK_ROOT=/home/x/env/android-ndk-r15c
export PREBUILT=$NDK_ROOT/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64
export PLATFORM=$NDK_ROOT/platforms/android-17
export CC=$PREBUILT/bin/arm-linux-androideabi-gcc
export CFLAGS="--sysroot=$PLATFORM/arch-arm -fPIC -DANDROID -DHAVE_PTHREAD -mfpu=neon -mfloat-abi=softfp -I$PLATFORM/arch-arm/usr/include"
#加入http://blog.csdn.net/w180600/article/details/78748739
export LDFLAGS=" -Wl,-rpath-link=$PLATFORM/arch-arm/usr/lib -L$PLATFORM/arch-arm/usr/lib -nostdlib"export OSIP_CFLAGS="-I/home/x/work/sip/libosip2-4.0.0/include -I/home/x/work/sip/libeXosip2-4.0.0/include"
export OSIP_LIBS="-L/home/x/work/sip/lib/libosip2/lib -losip -losipparser2"
./configure --host=arm --disable-tools --disable-shared --enable-static --prefix=/home/x/work/sip/lib/libosip2 --with-osip2=/home/x/work/sip/libosip2-4.0.0
make clean
make
make install
注意,exosip依赖于osip,所以需要加入osip的资源
3.执行编译脚本