FFTW安卓平台下编译

时间:2022-10-28 17:39:16

借用这里的内容。自己加以实践。

 编译命令:(个人保存为test.sh)

       

INSTALL_DIR=/home/lucas/fftw
SRC_DIR=/home/lucas/fftw-3.3.4/

cd $SRC_DIR


export PATH="$NDK_DIR/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/:$PATH"
export SYS_ROOT="$NDK_DIR/platforms/android-19/arch-arm/"
export CC="arm-linux-androideabi-gcc --sysroot=$SYS_ROOT -march=armv7-a -mfloat-abi=softfp"
export LD="arm-linux-androideabi-ld"
export AR="arm-linux-androideabi-ar"
export RANLIB="arm-linux-androideabi-ranlib"
export STRIP="arm-linux-androideabi-strip"
#export CFLAGS="-mfpu=neon -mfloat-abi=softfp"

mkdir -p $INSTALL_DIR
./configure --host=arm-eabi \
	--prefix=$INSTALL_DIR \
	LIBS="-lc -lgcc" \
	--enable-float \
	--enable-threads \
#	--with-combined-threads \
	--enable-neon

make
make install

exit 0
  如果有报错之类的,请检查下NDK的环境变量。

 如果不想编译,想用现成的,请移步这里