2006-02-18 05:49:24 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
# Berkeley Open Infrastructure for Network Computing
|
|
|
|
# http://boinc.berkeley.edu
|
|
|
|
# Copyright (C) 2005 University of California
|
|
|
|
#
|
|
|
|
# This is free software; you can redistribute it and/or
|
|
|
|
# modify it under the terms of the GNU Lesser General Public
|
|
|
|
# License as published by the Free Software Foundation;
|
|
|
|
# either version 2.1 of the License, or (at your option) any later version.
|
2005-12-22 02:33:59 +00:00
|
|
|
#
|
2006-02-18 05:49:24 +00:00
|
|
|
# This software is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
# See the GNU Lesser General Public License for more details.
|
2005-12-22 02:33:59 +00:00
|
|
|
#
|
2006-02-18 05:49:24 +00:00
|
|
|
# To view the GNU Lesser General Public License visit
|
|
|
|
# http://www.gnu.org/copyleft/lesser.html
|
|
|
|
# or write to the Free Software Foundation, Inc.,
|
2007-10-09 11:35:47 +00:00
|
|
|
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
2005-12-22 02:33:59 +00:00
|
|
|
#
|
2006-01-31 12:21:34 +00:00
|
|
|
#
|
2007-05-23 01:29:11 +00:00
|
|
|
# Script to build the wxMac-2.6.3 library for BOINC as a Universal Binary
|
2005-12-22 12:22:39 +00:00
|
|
|
#
|
2007-10-27 11:16:38 +00:00
|
|
|
# by Charlie Fenton 10/26/07
|
2007-05-02 10:09:47 +00:00
|
|
|
#
|
|
|
|
#
|
2007-05-23 01:29:11 +00:00
|
|
|
## In Terminal, CD to the wxMac-2.6.3 directory.
|
|
|
|
## cd [path]/wxMac-2.6.3/
|
2006-02-18 05:49:24 +00:00
|
|
|
## then run this script:
|
|
|
|
## source [ path_to_this_script ] [ -clean ]
|
|
|
|
##
|
|
|
|
## the -clean argument will force a full rebuild.
|
|
|
|
#
|
|
|
|
|
2005-12-22 02:33:59 +00:00
|
|
|
|
|
|
|
if [ "$1" = "-clean" ]; then
|
|
|
|
doclean="clean "
|
|
|
|
else
|
|
|
|
doclean=""
|
|
|
|
fi
|
|
|
|
|
2007-05-02 10:09:47 +00:00
|
|
|
mv -n include/wx/mac/setup.h include/wx/mac/setup_obs.h
|
|
|
|
cp -np include/wx/mac/setup0.h include/wx/mac/setup.h
|
|
|
|
|
|
|
|
# Create wx include directory if necessary
|
|
|
|
if [ ! -d src/build/include/wx ]; then
|
|
|
|
mkdir -p src/build/include/wx
|
|
|
|
fi
|
|
|
|
|
2007-05-23 01:29:11 +00:00
|
|
|
cp -n include/wx/mac/setup0.h src/build/include/wx/setup.h
|
2007-05-02 10:09:47 +00:00
|
|
|
|
|
|
|
|
2007-05-23 01:29:11 +00:00
|
|
|
if [ "$1" != "-clean" ] && [ -f src/build/Deployment/libwx_mac_ppc.a ]; then
|
|
|
|
echo "libwx_mac_ppc.a already built"
|
2005-12-22 11:37:36 +00:00
|
|
|
else
|
2007-05-23 01:29:11 +00:00
|
|
|
|
|
|
|
rm -f src/build/Deployment/libwx_mac.a
|
|
|
|
|
2007-10-31 10:40:19 +00:00
|
|
|
xcodebuild -project src/wxWindows.xcodeproj -target static -configuration Deployment $doclean build GCC_VERSION_ppc=4.0 MACOSX_DEPLOYMENT_TARGET_ppc=10.3 SDKROOT_ppc=/Developer/SDKs/MacOSX10.3.9.sdk ARCHS="ppc" EXECUTABLE_NAME="libwx_mac_ppc.a" OTHER_CFLAGS="-fvisibility=hidden -fvisibility-inlines-hidden"
|
2005-12-22 11:37:36 +00:00
|
|
|
|
2006-07-22 03:35:48 +00:00
|
|
|
if [ $? -ne 0 ]; then return 1; fi
|
2005-12-22 11:37:36 +00:00
|
|
|
fi
|
2005-12-22 02:33:59 +00:00
|
|
|
|
2007-05-23 01:29:11 +00:00
|
|
|
|
|
|
|
if [ "$1" != "-clean" ] && [ -f src/build/Deployment/libwx_mac_i386.a ]; then
|
|
|
|
echo "libwx_mac_i386.a already built"
|
2005-12-22 11:37:36 +00:00
|
|
|
else
|
2007-05-23 01:29:11 +00:00
|
|
|
|
|
|
|
rm -f src/build/Deployment/libwx_mac.a
|
|
|
|
|
2007-10-31 10:40:19 +00:00
|
|
|
xcodebuild -project src/wxWindows.xcodeproj -target static -configuration Deployment $doclean build GCC_VERSION_i386=4.0 MACOSX_DEPLOYMENT_TARGET_i386=10.4 SDKROOT_i386=/Developer/SDKs/MacOSX10.4u.sdk ARCHS="i386" EXECUTABLE_NAME="libwx_mac_i386.a" OTHER_CFLAGS="-fvisibility=hidden -fvisibility-inlines-hidden"
|
|
|
|
|
2007-05-23 01:29:11 +00:00
|
|
|
|
|
|
|
if [ $? -ne 0 ]; then return 1; fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ "$1" != "-clean" ] && [ -f src/build/Deployment/libwx_mac.a ]; then
|
|
|
|
echo "libwx_mac.a already built"
|
|
|
|
else
|
|
|
|
|
|
|
|
lipo -create src/build/Deployment/libwx_mac_ppc.a src/build/Deployment/libwx_mac_i386.a -output src/build/Deployment/libwx_mac.a
|
|
|
|
|
|
|
|
if [ $? -ne 0 ]; then return 1; fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
if [ "$1" != "-clean" ] && [ -f src/build/Deployment/libwx_macd_ppc.a ]; then
|
|
|
|
echo "libwx_macd_ppc.a already built"
|
|
|
|
else
|
|
|
|
|
|
|
|
rm -f src/build/Deployment/libwx_macd.a
|
|
|
|
|
2007-10-31 10:40:19 +00:00
|
|
|
xcodebuild -project src/wxWindows.xcodeproj -target static -configuration Deployment $doclean build GCC_VERSION_ppc=4.0 MACOSX_DEPLOYMENT_TARGET_ppc=10.3 SDKROOT_ppc=/Developer/SDKs/MacOSX10.3.9.sdk ARCHS="ppc" EXECUTABLE_NAME="libwx_macd_ppc.a" OTHER_CFLAGS="-fvisibility=hidden -fvisibility-inlines-hidden"
|
|
|
|
|
2007-05-23 01:29:11 +00:00
|
|
|
|
|
|
|
if [ $? -ne 0 ]; then return 1; fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ "$1" != "-clean" ] && [ -f src/build/Deployment/libwx_macd_i386.a ]; then
|
|
|
|
echo "libwx_macd_i386.a already built"
|
|
|
|
else
|
|
|
|
|
|
|
|
rm -f src/build/Deployment/libwx_macd.a
|
|
|
|
|
2007-10-31 10:40:19 +00:00
|
|
|
xcodebuild -project src/wxWindows.xcodeproj -target static -configuration Deployment $doclean build GCC_VERSION_i386=4.0 MACOSX_DEPLOYMENT_TARGET_i386=10.4 SDKROOT_i386=/Developer/SDKs/MacOSX10.4u.sdk ARCHS="i386" EXECUTABLE_NAME="libwx_macd_i386.a" OTHER_CFLAGS="-fvisibility=hidden -fvisibility-inlines-hidden"
|
|
|
|
|
2007-05-23 01:29:11 +00:00
|
|
|
|
|
|
|
if [ $? -ne 0 ]; then return 1; fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ "$1" != "-clean" ] && [ -f src/build/Deployment/libwx_macd.a ]; then
|
|
|
|
echo "libwx_macd.a already built"
|
|
|
|
else
|
|
|
|
|
|
|
|
lipo -create src/build/Deployment/libwx_macd_ppc.a src/build/Deployment/libwx_macd_i386.a -output src/build/Deployment/libwx_macd.a
|
2005-12-22 11:37:36 +00:00
|
|
|
|
2006-07-22 03:35:48 +00:00
|
|
|
if [ $? -ne 0 ]; then return 1; fi
|
2005-12-22 11:37:36 +00:00
|
|
|
fi
|
2005-12-22 02:33:59 +00:00
|
|
|
|
|
|
|
return 0
|
2005-12-22 11:37:36 +00:00
|
|
|
|