Changeset 3169 for pjproject/branches/projects/iphone/configure-iphone
- Timestamp:
- May 13, 2010 12:04:51 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/branches/projects/iphone/configure-iphone
r3168 r3169 2 2 3 3 if test "$*" = "--help" -o "$*" = "-h"; then 4 echo "configure-iphone [ SDK=name_path] [OPTIONS]"4 echo "configure-iphone [IPHONESDK=name_path] [OPTIONS]" 5 5 echo "" 6 echo "SDK=name_path Choose which SDK to use. Value can be SDK name (e.g." 7 echo " iPhoneOS2.2.1.sdk) or the full path of the SDK" 8 echo "OPTIONS Other options that will be passed directly to " 9 echo " ./aconfigure script. Run ./aconfigure --help for" 10 echo " more info." 6 echo "IPHONESDK=name_path Choose which SDK to use. Value can be SDK name" 7 echo " (e.g. iPhoneOS2.2.1.sdk) or the full path of" 8 echo " the SDK" 9 echo "OPTIONS Other options that will be passed directly to" 10 echo " ./aconfigure script. Run ./aconfigure --help" 11 echo " for more info." 11 12 echo "" 12 13 exit 0 … … 27 28 28 29 # Choose SDK version to use 29 if test " x$SDK" = "x"; then30 # If SDK is not set, use the latest one30 if test "$IPHONESDK" = ""; then 31 # If IPHONESDK is not set, use the latest one 31 32 for f in `ls $DEVPATH/SDKs/`; do echo $f | sed 's/\(.sdk\)//'; done | sort | tail -1 > tmpsdkname 32 SDK=`cat tmpsdkname`.sdk33 IPHONESDK=`cat tmpsdkname`.sdk 33 34 rm -f tmpsdkname 34 echo "$F info: using ${SDK}" 35 SDKPATH=${DEVPATH}/SDKs/${SDK} 36 elif test -d ${SDK}; then 37 # .. else if SDK is set and it points to a valid path, just use it 38 SDKPATH=${SDK} 35 SDKPATH=${DEVPATH}/SDKs/${IPHONESDK} 36 elif test -d ${IPHONESDK}; then 37 # .. else if IPHONESDK is set and it points to a valid path, just use it 38 SDKPATH=${IPHONESDK} 39 39 else 40 40 # .. else assume the SDK name is used. 41 SDKPATH=${DEVPATH}/SDKs/${ SDK}41 SDKPATH=${DEVPATH}/SDKs/${IPHONESDK} 42 42 fi 43 43 … … 48 48 fi 49 49 50 # Settings to feed to configure script 51 export CFLAGS="-O2 -arch armv6 -isysroot ${SDKPATH}" 52 export LDFLAGS="-O2 -arch armv6 -isysroot ${SDKPATH} -framework AudioToolbox -framework Foundation" 50 # Default CFLAGS if it's not specified 51 if test "$CFLAGS" = ""; then 52 CFLAGS="-O2 -Wno-unused-label" 53 fi 54 55 # Default LDFLAGS if it's not specified 56 if test "$LDFLAGS" = ""; then 57 LDFLAGS="-O2" 58 fi 59 60 # Settings to feed to configure script. Binaries should have the 61 # full path as it's not normally in user's PATH 62 export CC="${DEVPATH}/usr/bin/arm-apple-darwin9-gcc" 63 export CXX="${DEVPATH}/usr/bin/arm-apple-darwin9-g++" 64 export CFLAGS="${CFLAGS} -arch armv6 -isysroot ${SDKPATH}" 65 export LDFLAGS="${LDFLAGS} -arch armv6 -isysroot ${SDKPATH} -framework AudioToolbox -framework Foundation" 53 66 export AR="${DEVPATH}/usr/bin/libtool -static -o" 54 67 export RANLIB="echo ranlib" 55 68 # Use gcc -E as preprocessor instead of cpp, since cpp will find the 56 # header files in standard /usr/include 57 export CPP="${ DEVPATH}/usr/bin/arm-apple-darwin9-gcc-E -isysroot ${SDKPATH}"69 # header files in standard /usr/include instead of in isysroot 70 export CPP="${CC} -E -isysroot ${SDKPATH}" 58 71 59 # And finally invoke configure script itself72 # And finally invoke the configure script itself 60 73 ./aconfigure --host=arm-apple-darwin9 --disable-floating-point $* 61 74 75 if test "$?" = "0"; then 76 echo "Done configuring for `basename $SDKPATH`" 77 echo "" 78 fi 79
Note: See TracChangeset
for help on using the changeset viewer.