iOS7.1 Xcode5.1 编译 fftw 3.3.4



export RESULT_DIR=ios-library

# Select toolchains folder
export XCODE_TOOLCHAINS=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain
# Select the desired iPhone SDK
export DEVROOT_IOS=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer
export SDKROOT_IOS=$DEVROOT_IOS/SDKs/iPhoneOS7.1.sdk
# Select the OSX SDK
export DEVROOT_OSX=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer
export SDKROOT_OSX=$DEVROOT_OSX/SDKs/MacOSX10.9.sdk

# ------------------------ armv7---------------------------
# Set up relevant environment variables
export CPPFLAGS="-I$SDKROOT_IOS/usr/include/ -mfpu=neon"
export CFLAGS="$CPPFLAGS -arch armv7 -mfpu=neon -no-cpp-precomp -miphoneos-version-min=5.0 -isysroot $SDKROOT_IOS"
export LD=$XCODE_TOOLCHAINS/usr/bin/ld
export CXX="$XCODE_TOOLCHAINS/usr/bin/clang -x c++ -arch armv7 -std=gnu++11 -stdlib=libc++ -mfpu=neon"
export CC="$XCODE_TOOLCHAINS/usr/bin/clang -x c -arch armv7 -std=gnu99 -mfpu=neon"
export CXXFLAGS="$CFLAGS"

# TODO: add custom flags as necessary for package
#  remove '--enable-float' for double precision
#  and take a 'libfftw3.a' file instead
./configure --host=arm-apple-darwin --enable-float --enable-neon

make -j2

# Copy the ARM library to a temporary location
mkdir $RESULT_DIR
cp .libs/libfftw3f.a $RESULT_DIR/libfftw3f_armv7.a

# Copy the header file too, just for convenience
cp api/fftw3.h $RESULT_DIR/fftw3.h


from:http://stackoverflow.com/questions/3588904/how-to-link-third-party-libraries-like-fftw3-and-sndfile-to-an-iphone-project-in

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 3
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值