| 1 | #===============================================================================
|
|---|
| 2 | # Filename: boost.sh
|
|---|
| 3 | # Author: Pete Goodliffe, Daniel Rosser
|
|---|
| 4 | # Copyright: (c) Copyright 2009 Pete Goodliffe, 2013 Daniel Rosser
|
|---|
| 5 | # Licence: Please feel free to use this, with attribution
|
|---|
| 6 | # Modified version ## for ofxiOSBoost
|
|---|
| 7 | #===============================================================================
|
|---|
| 8 | #
|
|---|
| 9 | # Builds a Boost framework for the iPhone.
|
|---|
| 10 | # Creates a set of universal libraries that can be used on an iPhone and in the
|
|---|
| 11 | # iPhone simulator. Then creates a pseudo-framework to make using boost in Xcode
|
|---|
| 12 | # less painful.
|
|---|
| 13 | #
|
|---|
| 14 | # To configure the script, define:
|
|---|
| 15 | # BOOST_LIBS: which libraries to build
|
|---|
| 16 | # IPHONE_SDKVERSION: iPhone SDK version (e.g. 8.0)
|
|---|
| 17 | #
|
|---|
| 18 | # Then go get the source tar.bz of the boost you want to build, shove it in the
|
|---|
| 19 | # same directory as this script, and run "./boost.sh". Grab a cuppa. And voila.
|
|---|
| 20 | #===============================================================================
|
|---|
| 21 |
|
|---|
| 22 | #!/bin/sh
|
|---|
| 23 | here="`dirname \"$0\"`"
|
|---|
| 24 | echo "cd-ing to $here"
|
|---|
| 25 | cd "$here" || exit 1
|
|---|
| 26 |
|
|---|
| 27 | CPPSTD=c++11 #c++89, c++99, c++14
|
|---|
| 28 | STDLIB=libc++ # libstdc++
|
|---|
| 29 | COMPILER=clang++
|
|---|
| 30 |
|
|---|
| 31 | BOOST_V1=1.57.0
|
|---|
| 32 | BOOST_V2=1_57_0
|
|---|
| 33 |
|
|---|
| 34 | CURRENTPATH=`pwd`
|
|---|
| 35 | LOGDIR="$CURRENTPATH/build/logs/"
|
|---|
| 36 |
|
|---|
| 37 | SDKVERSION=`xcrun -sdk iphoneos --show-sdk-version`
|
|---|
| 38 | OSX_SDKVERSION=`xcrun -sdk macosx --show-sdk-version`
|
|---|
| 39 | DEVELOPER=`xcode-select -print-path`
|
|---|
| 40 | XCODE_ROOT=`xcode-select -print-path`
|
|---|
| 41 |
|
|---|
| 42 | if [ ! -d "$DEVELOPER" ]; then
|
|---|
| 43 | echo "xcode path is not set correctly $DEVELOPER does not exist (most likely because of xcode > 4.3)"
|
|---|
| 44 | echo "run"
|
|---|
| 45 | echo "sudo xcode-select -switch <xcode path>"
|
|---|
| 46 | echo "for default installation:"
|
|---|
| 47 | echo "sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer"
|
|---|
| 48 | exit 1
|
|---|
| 49 | fi
|
|---|
| 50 |
|
|---|
| 51 | case $DEVELOPER in
|
|---|
| 52 | *\ * )
|
|---|
| 53 | echo "Your Xcode path contains whitespaces, which is not supported."
|
|---|
| 54 | exit 1
|
|---|
| 55 | ;;
|
|---|
| 56 | esac
|
|---|
| 57 |
|
|---|
| 58 | case $CURRENTPATH in
|
|---|
| 59 | *\ * )
|
|---|
| 60 | echo "Your path contains whitespaces, which is not supported by 'make install'."
|
|---|
| 61 | exit 1
|
|---|
| 62 | ;;
|
|---|
| 63 | esac
|
|---|
| 64 |
|
|---|
| 65 | #: ${BOOST_LIBS:="random regex graph random chrono thread signals filesystem system date_time"}
|
|---|
| 66 | : ${BOOST_LIBS:="coroutine random regex graph random chrono thread signals filesystem system date_time"}
|
|---|
| 67 | : ${IPHONE_SDKVERSION:=`xcodebuild -showsdks | grep iphoneos | egrep "[[:digit:]]+\.[[:digit:]]+" -o | tail -1`}
|
|---|
| 68 | : ${EXTRA_CPPFLAGS:="-DBOOST_AC_USE_PTHREADS -DBOOST_SP_USE_PTHREADS -std=$CPPSTD -stdlib=$STDLIB"}
|
|---|
| 69 |
|
|---|
| 70 | # The EXTRA_CPPFLAGS definition works around a thread race issue in
|
|---|
| 71 | # shared_ptr. I encountered this historically and have not verified that
|
|---|
| 72 | # the fix is no longer required. Without using the posix thread primitives
|
|---|
| 73 | # an invalid compare-and-swap ARM instruction (non-thread-safe) was used for the
|
|---|
| 74 | # shared_ptr use count causing nasty and subtle bugs.
|
|---|
| 75 | #
|
|---|
| 76 | # Should perhaps also consider/use instead: -BOOST_SP_USE_PTHREADS
|
|---|
| 77 |
|
|---|
| 78 | : ${TARBALLDIR:=`pwd`/..}
|
|---|
| 79 | : ${SRCDIR:=`pwd`/../build/src}
|
|---|
| 80 | : ${IOSBUILDDIR:=`pwd`/../build/libs/boost/lib}
|
|---|
| 81 | : ${IOSINCLUDEDIR:=`pwd`/../build/libs/boost/include/boost}
|
|---|
| 82 | : ${PREFIXDIR:=`pwd`/../build/ios/prefix}
|
|---|
| 83 | : ${COMPILER:="clang++"}
|
|---|
| 84 | : ${OUTPUT_DIR:=`pwd`/../libs/boost/}
|
|---|
| 85 | : ${OUTPUT_DIR_LIB:=`pwd`/../libs/boost/ios/}
|
|---|
| 86 | : ${OUTPUT_DIR_SRC:=`pwd`/../libs/boost/include/boost}
|
|---|
| 87 |
|
|---|
| 88 | : ${BOOST_VERSION:=$BOOST_V1}
|
|---|
| 89 | : ${BOOST_VERSION2:=$BOOST_V2}
|
|---|
| 90 |
|
|---|
| 91 | BOOST_TARBALL=$TARBALLDIR/boost_$BOOST_VERSION2.tar.bz2
|
|---|
| 92 | BOOST_SRC=$SRCDIR/boost_${BOOST_VERSION2}
|
|---|
| 93 | BOOST_INCLUDE=$BOOST_SRC/boost
|
|---|
| 94 |
|
|---|
| 95 |
|
|---|
| 96 |
|
|---|
| 97 | #===============================================================================
|
|---|
| 98 | ARM_DEV_CMD="xcrun --sdk iphoneos"
|
|---|
| 99 | SIM_DEV_CMD="xcrun --sdk iphonesimulator"
|
|---|
| 100 | OSX_DEV_CMD="xcrun --sdk macosx"
|
|---|
| 101 |
|
|---|
| 102 | ARM_COMBINED_LIB=$IOSBUILDDIR/lib_boost_arm.a
|
|---|
| 103 |
|
|---|
| 104 | #===============================================================================
|
|---|
| 105 |
|
|---|
| 106 |
|
|---|
| 107 | #===============================================================================
|
|---|
| 108 | # Functions
|
|---|
| 109 | #===============================================================================
|
|---|
| 110 |
|
|---|
| 111 | abort()
|
|---|
| 112 | {
|
|---|
| 113 | echo
|
|---|
| 114 | echo "Aborted: $@"
|
|---|
| 115 | exit 1
|
|---|
| 116 | }
|
|---|
| 117 |
|
|---|
| 118 | doneSection()
|
|---|
| 119 | {
|
|---|
| 120 | echo
|
|---|
| 121 | echo "================================================================="
|
|---|
| 122 | echo "Done"
|
|---|
| 123 | echo
|
|---|
| 124 | }
|
|---|
| 125 |
|
|---|
| 126 | #===============================================================================
|
|---|
| 127 |
|
|---|
| 128 | cleanEverythingReadyToStart()
|
|---|
| 129 | {
|
|---|
| 130 | echo Cleaning everything before we start to build...
|
|---|
| 131 |
|
|---|
| 132 | rm -rf iphone-build iphonesim-build osx-build
|
|---|
| 133 | rm -rf $IOSBUILDDIR
|
|---|
| 134 | rm -rf $PREFIXDIR
|
|---|
| 135 | rm -rf $IOSINCLUDEDIR
|
|---|
| 136 | rm -rf $TARBALLDIR/build
|
|---|
| 137 | rm -rf $LOGDIR
|
|---|
| 138 |
|
|---|
| 139 | doneSection
|
|---|
| 140 | }
|
|---|
| 141 |
|
|---|
| 142 | postcleanEverything()
|
|---|
| 143 | {
|
|---|
| 144 | echo Cleaning everything after the build...
|
|---|
| 145 |
|
|---|
| 146 | rm -rf iphone-build iphonesim-build osx-build
|
|---|
| 147 | rm -rf $PREFIXDIR
|
|---|
| 148 | rm -rf $IOSBUILDDIR/armv6/obj
|
|---|
| 149 | rm -rf $IOSBUILDDIR/armv7/obj
|
|---|
| 150 | rm -rf $IOSBUILDDIR/armv7s/obj
|
|---|
| 151 | rm -rf $IOSBUILDDIR/arm64/obj
|
|---|
| 152 | rm -rf $IOSBUILDDIR/i386/obj
|
|---|
| 153 | rm -rf $IOSBUILDDIR/x86_64/obj
|
|---|
| 154 | rm -rf $TARBALLDIR/build
|
|---|
| 155 | rm -rf $LOGDIR
|
|---|
| 156 | doneSection
|
|---|
| 157 | }
|
|---|
| 158 |
|
|---|
| 159 | prepare()
|
|---|
| 160 | {
|
|---|
| 161 |
|
|---|
| 162 | mkdir -p $LOGDIR
|
|---|
| 163 | mkdir -p $OUTPUT_DIR
|
|---|
| 164 | mkdir -p $OUTPUT_DIR_SRC
|
|---|
| 165 | mkdir -p $OUTPUT_DIR_LIB
|
|---|
| 166 |
|
|---|
| 167 | }
|
|---|
| 168 |
|
|---|
| 169 | #===============================================================================
|
|---|
| 170 |
|
|---|
| 171 | downloadBoost()
|
|---|
| 172 | {
|
|---|
| 173 | if [ ! -s $TARBALLDIR/boost_${BOOST_VERSION2}.tar.bz2 ]; then
|
|---|
| 174 | echo "Downloading boost ${BOOST_VERSION}"
|
|---|
| 175 | curl -L -o $TARBALLDIR/boost_${BOOST_VERSION2}.tar.bz2 sourceforge.net/projects/boost/files/boost/${BOOST_VERSION}/boost_${BOOST_VERSION2}.tar.bz2/download
|
|---|
| 176 | fi
|
|---|
| 177 |
|
|---|
| 178 | doneSection
|
|---|
| 179 | }
|
|---|
| 180 |
|
|---|
| 181 | #===============================================================================
|
|---|
| 182 |
|
|---|
| 183 | unpackBoost()
|
|---|
| 184 | {
|
|---|
| 185 | [ -f "$BOOST_TARBALL" ] || abort "Source tarball missing."
|
|---|
| 186 |
|
|---|
| 187 | echo Unpacking boost into $SRCDIR...
|
|---|
| 188 |
|
|---|
| 189 | [ -d $SRCDIR ] || mkdir -p $SRCDIR
|
|---|
| 190 | [ -d $BOOST_SRC ] || ( cd $SRCDIR; tar xfj $BOOST_TARBALL )
|
|---|
| 191 | [ -d $BOOST_SRC ] && echo " ...unpacked as $BOOST_SRC"
|
|---|
| 192 |
|
|---|
| 193 | doneSection
|
|---|
| 194 | }
|
|---|
| 195 |
|
|---|
| 196 | #===============================================================================
|
|---|
| 197 |
|
|---|
| 198 | restoreBoost()
|
|---|
| 199 | {
|
|---|
| 200 | cp $BOOST_SRC/tools/build/example/user-config.jam-bk $BOOST_SRC/tools/build/example/user-config.jam
|
|---|
| 201 | }
|
|---|
| 202 |
|
|---|
| 203 | #===============================================================================
|
|---|
| 204 |
|
|---|
| 205 | updateBoost()
|
|---|
| 206 | {
|
|---|
| 207 | echo Updating boost into $BOOST_SRC...
|
|---|
| 208 |
|
|---|
| 209 | cp $BOOST_SRC/tools/build/example/user-config.jam $BOOST_SRC/tools/build/example/user-config.jam-bk
|
|---|
| 210 |
|
|---|
| 211 | cat >> $BOOST_SRC/tools/build/example/user-config.jam <<EOF
|
|---|
| 212 | using darwin : ${IPHONE_SDKVERSION}~iphone
|
|---|
| 213 | : $XCODE_ROOT/Toolchains/XcodeDefault.xctoolchain/usr/bin/$COMPILER -arch armv7 -arch armv7s -arch arm64 -fvisibility=hidden -fvisibility-inlines-hidden $EXTRA_CPPFLAGS
|
|---|
| 214 | : <striper> <root>$XCODE_ROOT/Platforms/iPhoneOS.platform/Developer
|
|---|
| 215 | : <architecture>arm <target-os>iphone
|
|---|
| 216 | ;
|
|---|
| 217 | using darwin : ${IPHONE_SDKVERSION}~iphonesim
|
|---|
| 218 | : $XCODE_ROOT/Toolchains/XcodeDefault.xctoolchain/usr/bin/$COMPILER -arch i386 -arch x86_64 -fvisibility=hidden -fvisibility-inlines-hidden $EXTRA_CPPFLAGS
|
|---|
| 219 | : <striper> <root>$XCODE_ROOT/Platforms/iPhoneSimulator.platform/Developer
|
|---|
| 220 | : <architecture>x86 <target-os>iphone
|
|---|
| 221 | ;
|
|---|
| 222 | EOF
|
|---|
| 223 |
|
|---|
| 224 | doneSection
|
|---|
| 225 | }
|
|---|
| 226 |
|
|---|
| 227 | #===============================================================================
|
|---|
| 228 |
|
|---|
| 229 | inventMissingHeaders()
|
|---|
| 230 | {
|
|---|
| 231 | # These files are missing in the ARM iPhoneOS SDK, but they are in the simulator.
|
|---|
| 232 | # They are supported on the device, so we copy them from x86 SDK to a staging area
|
|---|
| 233 | # to use them on ARM, too.
|
|---|
| 234 | echo Invent missing headers
|
|---|
| 235 |
|
|---|
| 236 | cp $XCODE_ROOT/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator${IPHONE_SDKVERSION}.sdk/usr/include/{crt_externs,bzlib}.h $BOOST_SRC
|
|---|
| 237 | }
|
|---|
| 238 |
|
|---|
| 239 | #===============================================================================
|
|---|
| 240 |
|
|---|
| 241 | bootstrapBoost()
|
|---|
| 242 | {
|
|---|
| 243 | cd $BOOST_SRC
|
|---|
| 244 |
|
|---|
| 245 | BOOST_LIBS_COMMA=$(echo $BOOST_LIBS | sed -e "s/ /,/g")
|
|---|
| 246 | echo "Bootstrapping (with libs $BOOST_LIBS_COMMA)"
|
|---|
| 247 | ./bootstrap.sh --with-libraries=$BOOST_LIBS_COMMA
|
|---|
| 248 |
|
|---|
| 249 | doneSection
|
|---|
| 250 | }
|
|---|
| 251 |
|
|---|
| 252 | #===============================================================================
|
|---|
| 253 |
|
|---|
| 254 | buildBoostForIPhoneOS()
|
|---|
| 255 | {
|
|---|
| 256 | cd $BOOST_SRC
|
|---|
| 257 |
|
|---|
| 258 | # Install this one so we can copy the includes for the frameworks...
|
|---|
| 259 |
|
|---|
| 260 |
|
|---|
| 261 | set +e
|
|---|
| 262 | echo "------------------"
|
|---|
| 263 | LOG="$LOGDIR/build-iphone-stage.log"
|
|---|
| 264 | echo "Running bjam for iphone-build stage"
|
|---|
| 265 | echo "To see status in realtime check:"
|
|---|
| 266 | echo " ${LOG}"
|
|---|
| 267 | echo "Please stand by..."
|
|---|
| 268 | ./bjam -j16 --build-dir=iphone-build -sBOOST_BUILD_USER_CONFIG=$BOOST_SRC/tools/build/example/user-config.jam --stagedir=iphone-build/stage --prefix=$PREFIXDIR abi=aapcs binary-format=mach-o address-model=32 toolset=darwin architecture=arm target-os=iphone macosx-version=iphone-${IPHONE_SDKVERSION} define=_LITTLE_ENDIAN link=static stage > "${LOG}" 2>&1
|
|---|
| 269 | if [ $? != 0 ]; then
|
|---|
| 270 | echo "Problem while Building iphone-build stage - Please check ${LOG}"
|
|---|
| 271 | exit 1
|
|---|
| 272 | else
|
|---|
| 273 | echo "iphone-build stage successful"
|
|---|
| 274 | fi
|
|---|
| 275 |
|
|---|
| 276 | echo "------------------"
|
|---|
| 277 | LOG="$LOGDIR/build-iphone-install.log"
|
|---|
| 278 | echo "Running bjam for iphone-build install"
|
|---|
| 279 | echo "To see status in realtime check:"
|
|---|
| 280 | echo " ${LOG}"
|
|---|
| 281 | echo "Please stand by..."
|
|---|
| 282 | ./bjam -j16 --build-dir=iphone-build -sBOOST_BUILD_USER_CONFIG=$BOOST_SRC/tools/build/example/user-config.jam --stagedir=iphone-build/stage --prefix=$PREFIXDIR abi=aapcs binary-format=mach-o address-model=32 toolset=darwin architecture=arm target-os=iphone macosx-version=iphone-${IPHONE_SDKVERSION} define=_LITTLE_ENDIAN link=static install > "${LOG}" 2>&1
|
|---|
| 283 | if [ $? != 0 ]; then
|
|---|
| 284 | echo "Problem while Building iphone-build install - Please check ${LOG}"
|
|---|
| 285 | exit 1
|
|---|
| 286 | else
|
|---|
| 287 | echo "iphone-build install successful"
|
|---|
| 288 | fi
|
|---|
| 289 | doneSection
|
|---|
| 290 |
|
|---|
| 291 | echo "------------------"
|
|---|
| 292 | LOG="$LOGDIR/build-iphone-simulator-build.log"
|
|---|
| 293 | echo "Running bjam for iphone-sim-build "
|
|---|
| 294 | echo "To see status in realtime check:"
|
|---|
| 295 | echo " ${LOG}"
|
|---|
| 296 | echo "Please stand by..."
|
|---|
| 297 | ./bjam -j16 --build-dir=iphonesim-build -sBOOST_BUILD_USER_CONFIG=$BOOST_SRC/tools/build/example/user-config.jam --stagedir=iphonesim-build/stage --toolset=darwin-${IPHONE_SDKVERSION}~iphonesim architecture=x86 target-os=iphone macosx-version=iphonesim-${IPHONE_SDKVERSION} link=static stage > "${LOG}" 2>&1
|
|---|
| 298 | if [ $? != 0 ]; then
|
|---|
| 299 | echo "Problem while Building iphone-simulator build - Please check ${LOG}"
|
|---|
| 300 | exit 1
|
|---|
| 301 | else
|
|---|
| 302 | echo "iphone-simulator build successful"
|
|---|
| 303 | fi
|
|---|
| 304 |
|
|---|
| 305 | doneSection
|
|---|
| 306 | }
|
|---|
| 307 |
|
|---|
| 308 | #===============================================================================
|
|---|
| 309 |
|
|---|
| 310 | scrunchAllLibsTogetherInOneLibPerPlatform()
|
|---|
| 311 | {
|
|---|
| 312 | cd $BOOST_SRC
|
|---|
| 313 |
|
|---|
| 314 | mkdir -p $IOSBUILDDIR/armv7/obj
|
|---|
| 315 | mkdir -p $IOSBUILDDIR/armv7s/obj
|
|---|
| 316 | mkdir -p $IOSBUILDDIR/arm64/obj
|
|---|
| 317 | mkdir -p $IOSBUILDDIR/i386/obj
|
|---|
| 318 | mkdir -p $IOSBUILDDIR/x86_64/obj
|
|---|
| 319 |
|
|---|
| 320 | ALL_LIBS=""
|
|---|
| 321 |
|
|---|
| 322 | echo Splitting all existing fat binaries...
|
|---|
| 323 |
|
|---|
| 324 | for NAME in $BOOST_LIBS; do
|
|---|
| 325 | ALL_LIBS="$ALL_LIBS libboost_$NAME.a"
|
|---|
| 326 |
|
|---|
| 327 | $ARM_DEV_CMD lipo "iphone-build/stage/lib/libboost_$NAME.a" -thin armv7 -o $IOSBUILDDIR/armv7/libboost_$NAME.a
|
|---|
| 328 | $ARM_DEV_CMD lipo "iphone-build/stage/lib/libboost_$NAME.a" -thin armv7s -o $IOSBUILDDIR/armv7s/libboost_$NAME.a
|
|---|
| 329 | $ARM_DEV_CMD lipo "iphone-build/stage/lib/libboost_$NAME.a" -thin arm64 -o $IOSBUILDDIR/arm64/libboost_$NAME.a
|
|---|
| 330 |
|
|---|
| 331 | $ARM_DEV_CMD lipo "iphonesim-build/stage/lib/libboost_$NAME.a" -thin i386 -o $IOSBUILDDIR/i386/libboost_$NAME.a
|
|---|
| 332 | $ARM_DEV_CMD lipo "iphonesim-build/stage/lib/libboost_$NAME.a" -thin x86_64 -o $IOSBUILDDIR/x86_64/libboost_$NAME.a
|
|---|
| 333 |
|
|---|
| 334 | done
|
|---|
| 335 |
|
|---|
| 336 | echo "Decomposing each architecture's .a files"
|
|---|
| 337 |
|
|---|
| 338 | for NAME in $ALL_LIBS; do
|
|---|
| 339 | echo Decomposing $NAME...
|
|---|
| 340 | (cd $IOSBUILDDIR/armv7/obj; ar -x ../$NAME );
|
|---|
| 341 | (cd $IOSBUILDDIR/armv7s/obj; ar -x ../$NAME );
|
|---|
| 342 | (cd $IOSBUILDDIR/arm64/obj; ar -x ../$NAME );
|
|---|
| 343 | (cd $IOSBUILDDIR/i386/obj; ar -x ../$NAME );
|
|---|
| 344 | (cd $IOSBUILDDIR/x86_64/obj; ar -x ../$NAME );
|
|---|
| 345 | done
|
|---|
| 346 |
|
|---|
| 347 | echo "Linking each architecture into an uberlib ($ALL_LIBS => libboost.a )"
|
|---|
| 348 |
|
|---|
| 349 | rm $IOSBUILDDIR/*/libboost.a
|
|---|
| 350 |
|
|---|
| 351 | echo ...armv7
|
|---|
| 352 | (cd $IOSBUILDDIR/armv7; $ARM_DEV_CMD ar crus libboost.a obj/*.o; )
|
|---|
| 353 | echo ...armv7s
|
|---|
| 354 | (cd $IOSBUILDDIR/armv7s; $ARM_DEV_CMD ar crus libboost.a obj/*.o; )
|
|---|
| 355 | echo ...arm64
|
|---|
| 356 | (cd $IOSBUILDDIR/arm64; $ARM_DEV_CMD ar crus libboost.a obj/*.o; )
|
|---|
| 357 | echo ...i386
|
|---|
| 358 | (cd $IOSBUILDDIR/i386; $SIM_DEV_CMD ar crus libboost.a obj/*.o; )
|
|---|
| 359 | echo ...x86_64
|
|---|
| 360 | (cd $IOSBUILDDIR/x86_64; $SIM_DEV_CMD ar crus libboost.a obj/*.o; )
|
|---|
| 361 |
|
|---|
| 362 | echo "Making fat lib for iOS Boost $BOOST_VERSION"
|
|---|
| 363 | lipo -c $IOSBUILDDIR/armv7/libboost.a \
|
|---|
| 364 | $IOSBUILDDIR/armv7s/libboost.a \
|
|---|
| 365 | $IOSBUILDDIR/arm64/libboost.a \
|
|---|
| 366 | $IOSBUILDDIR/i386/libboost.a \
|
|---|
| 367 | $IOSBUILDDIR/x86_64/libboost.a \
|
|---|
| 368 | -output $OUTPUT_DIR_LIB/boost.a
|
|---|
| 369 |
|
|---|
| 370 | echo "Completed Fat Lib"
|
|---|
| 371 | echo "------------------"
|
|---|
| 372 |
|
|---|
| 373 | }
|
|---|
| 374 |
|
|---|
| 375 | #===============================================================================
|
|---|
| 376 | buildIncludes()
|
|---|
| 377 | {
|
|---|
| 378 |
|
|---|
| 379 | mkdir -p $IOSINCLUDEDIR
|
|---|
| 380 | echo "------------------"
|
|---|
| 381 | echo "Copying Includes to Final Dir $OUTPUT_DIR_SRC"
|
|---|
| 382 | LOG="$LOGDIR/buildIncludes.log"
|
|---|
| 383 | set +e
|
|---|
| 384 |
|
|---|
| 385 | cp -r $PREFIXDIR/include/boost/* $OUTPUT_DIR_SRC/ > "${LOG}" 2>&1
|
|---|
| 386 | if [ $? != 0 ]; then
|
|---|
| 387 | echo "Problem while copying includes - Please check ${LOG}"
|
|---|
| 388 | exit 1
|
|---|
| 389 | else
|
|---|
| 390 | echo "Copy of Includes successful"
|
|---|
| 391 | fi
|
|---|
| 392 | echo "------------------"
|
|---|
| 393 |
|
|---|
| 394 | doneSection
|
|---|
| 395 | }
|
|---|
| 396 |
|
|---|
| 397 | #===============================================================================
|
|---|
| 398 | # Execution starts here
|
|---|
| 399 | #===============================================================================
|
|---|
| 400 |
|
|---|
| 401 | mkdir -p $IOSBUILDDIR
|
|---|
| 402 |
|
|---|
| 403 | cleanEverythingReadyToStart #may want to comment if repeatedly running during dev
|
|---|
| 404 | restoreBoost
|
|---|
| 405 |
|
|---|
| 406 | echo "BOOST_VERSION: $BOOST_VERSION"
|
|---|
| 407 | echo "BOOST_LIBS: $BOOST_LIBS"
|
|---|
| 408 | echo "BOOST_SRC: $BOOST_SRC"
|
|---|
| 409 | echo "IOSBUILDDIR: $IOSBUILDDIR"
|
|---|
| 410 | echo "PREFIXDIR: $PREFIXDIR"
|
|---|
| 411 | echo "IOSFRAMEWORKDIR: $IOSFRAMEWORKDIR"
|
|---|
| 412 | echo "OSXFRAMEWORKDIR: $OSXFRAMEWORKDIR"
|
|---|
| 413 | echo "IPHONE_SDKVERSION: $IPHONE_SDKVERSION"
|
|---|
| 414 | echo "XCODE_ROOT: $XCODE_ROOT"
|
|---|
| 415 | echo "COMPILER: $COMPILER"
|
|---|
| 416 | echo
|
|---|
| 417 |
|
|---|
| 418 | downloadBoost
|
|---|
| 419 | unpackBoost
|
|---|
| 420 | #inventMissingHeaders
|
|---|
| 421 | prepare
|
|---|
| 422 | bootstrapBoost
|
|---|
| 423 | updateBoost
|
|---|
| 424 | buildBoostForIPhoneOS
|
|---|
| 425 | scrunchAllLibsTogetherInOneLibPerPlatform
|
|---|
| 426 | buildIncludes
|
|---|
| 427 |
|
|---|
| 428 | restoreBoost
|
|---|
| 429 |
|
|---|
| 430 | postcleanEverything
|
|---|
| 431 |
|
|---|
| 432 | echo "Completed successfully"
|
|---|
| 433 |
|
|---|
| 434 | #===============================================================================
|
|---|