我正在编写一个针对几种不同手机的程序,包括iPhone.该计划取决于几个第三方图书馆.我很难为iPhone和iPhone模拟器交叉编译这些第三方库.这些库包括Apache Portable Runtime和GNUTLS,以及它们的依赖项.我希望构建的库最后以前缀"/opt/iphone-3.1","/ opt/iphone-3.0","/ opt/iphone-2.2.1","/ opt /iphone-modules3.1 "和"/opt/iphone-simulator-3.0"分别.
为了使交叉编译过程易于重复,我正在创建脚本来为每个目标平台调用"configure"脚本("iphone3.1-configure","iphone3.0-configure","iphone2.2.1" -configure","iphonesim3.1-configure"和"iphonesim3.0-configure").这是我遇到麻烦的地方.
我正在使用Mac OS X 10.6 Snow Leopard计算机和官方Xcode 3.2 + iPhone SDK 3.1.
我目前有以下"iphone3.1-configure"脚本:
#! /bin/bash # # Program : iphone3.1-configure # Author : Michael Aaron Safyan # Synopsis : # This program runs the "configure" script generated by the # GNU Autotools in order to cross-compile thirdparty libraries # for the iPhone 3.1 SDK. Run this script while in a directory # containing an autotools "configure" script. Once run, …