Makefile.am内容如下
AUTOMAKE_OPTIONS = foreign bin_PROGRAMS = test test_SOURCES = test.c
依次执行
aclocal
autoheader
autoconf
automake --add-missing
编写脚本build.sh,内容如下
执行脚本build.sh后编译即可。
另有Funambol的脚本,也可使用,内容如下
command for C compiller: ./configure --host=arm-eabi CC=arm-eabi-gcc CPPFLAGS="-I$ANDROID_ROOT/build/platforms/android-5/arch-arm/usr/include/" CFLAGS="-nostdlib -fno-exceptions -fno-rtti -Wno-multichar" LDFLAGS="-Wl,-rpath-link=$ANDROID_ROOT/build/platforms/android-5/arch-arm/usr/lib/ -L$ANDROID_ROOT/build/platforms/android-5/arch-arm/usr/lib/" LIBS="-lc" command for C++ compiller: ./configure --host=arm-eabi CXX=arm-eabi-g++ CPPFLAGS="-I$ANDROID_ROOT/build/platforms/android-5/arch-arm/usr/include/ -nostdlib -fno-exceptions -fno-rtti -Wno-multichar" LDFLAGS="-Wl,-rpath-link=$ANDROID_ROOT/build/platforms/android-5/arch-arm/usr/lib/ -L$ANDROID_ROOT/build/platforms/android-5/arch-arm/usr/lib/" LIBS="-lc"