fftw3 版本:fftw-3.3.7 下载地址:https://download.csdn.net/download/xhiehf/11644313
ndk下载地址: https://developer.android.google.cn/ndk/downloads?hl=zh-cn 版本:android-ndk-r19c-linux-x86_64.zip
#!/bin/sh
# Compiles fftw3 for Android
#NDK 下载地址:https://developer.android.google.cn/ndk/downloads?hl=zh-cn 版本:android-ndk-r19c-linux-x86_64.zip
export NDK_DIR="/opt/android-ndk/android-ndk-r17c"
export INSTALL_DIR="`pwd`/jni_arm"
export API=24
export TOOLCHAIN="$NDK_DIR/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin"
export SYS_ROOT="$NDK_DIR/platforms/android-$API/arch-arm/"
export CC="$TOOLCHAIN/arm-linux-androideabi-gcc --sysroot=$SYS_ROOT"
export LD="$TOOLCHAIN/arm-linux-androideabi-ld"
export LD_LIBRARY_PATH="$NDK_DIR/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/4.9.x"
export AR="$TOOLCHAIN/arm-linux-androideabi-ar"
export RANLIB="$TOOLCHAIN/arm-linux-androideabi-ranlib"
export STRIP="$TOOLCHAIN/arm-linux-androideabi-strip"
export CFLAGS="-march=armv7-a -mfloat-abi=softfp -mfpu=neon -fno-builtin-memmove -mthumb -D__ANDROID_API__=$API"
export C_INCLUDE_PATH="$NDK_DIR/sysroot/usr/include:$NDK_DIR/sysroot/usr/include/arm-linux-androideabi"
mkdir -p $INSTALL_DIR
./configure --host=arm-linux-androideabi \
--prefix=$INSTALL_DIR \
LIBS="-L$LD_LIBRARY_PATH -L$SYS_ROOT/usr/lib -lc -lgcc" \
--enable-shared\
--enable-float --enable-neon
make -j4
make install