mirror of https://github.com/BOINC/boinc.git
Samples: Update Mac build script and make files for example_app for OS 10.6 and XCode 3.2
svn path=/trunk/boinc/; revision=20585
This commit is contained in:
parent
950b53081f
commit
ee9fffcc49
|
@ -1208,3 +1208,13 @@ David 15 Feb 2010
|
|||
- web: more translations, from Christian. fixes #982
|
||||
|
||||
html/various
|
||||
|
||||
Charlie 16 Feb 2010
|
||||
- Samples: Update MakeMacExample.sh and Mac make files in example_app for
|
||||
OS 10.6 and XCode 3.2.
|
||||
|
||||
samples/
|
||||
example_app/
|
||||
Makefile_mac
|
||||
Makefile_mac2
|
||||
MakeMacExample.sh
|
||||
|
|
|
@ -20,46 +20,57 @@
|
|||
#
|
||||
# Script to build Macintosh example_app using Makefile
|
||||
#
|
||||
# by Charlie Fenton 5/2/08
|
||||
# This will build for OS 10.3.9 and later on Mac OS 10.5 and XCode 3.1
|
||||
# if you have installed the OS 10.3.9 SDK.
|
||||
#
|
||||
# This will build for OS 10.4 and later on Mac OS 10.6 and XCode 3.2 or
|
||||
# on Mac OS 10.5 and XCode 3.1 if you have not installed OS 10.3.9 SDK.
|
||||
#
|
||||
# by Charlie Fenton 2/16/10
|
||||
#
|
||||
## First, build the BOINC libraries using boinc/mac_build/BuildMacBOINC.sh
|
||||
##
|
||||
## In Terminal, CD to the example_app directory.
|
||||
## cd [path]/example_app/
|
||||
## then run this script:
|
||||
## sh [path]/MakeMacExample.sh [ -clean ]
|
||||
## sh [path]/MakeMacExample.sh
|
||||
##
|
||||
## the -clean argument will force a full rebuild.
|
||||
#
|
||||
|
||||
rm -fR ppc i386 x86_64
|
||||
|
||||
if [ ! -d /Developer/SDKs/MacOSX10.3.9.sdk/ ]; then
|
||||
echo "ERROR: System 10.3.9 SDK is missing. For details, see build instructions at"
|
||||
echo "boinc/mac_build/HowToBuildBOINC_XCode.rtf or http://boinc.berkeley.edu/trac/wiki/MacBuild"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -d /Developer/SDKs/MacOSX10.4u.sdk/ ]; then
|
||||
echo "ERROR: System 10.4u SDK is missing. For details, see build instructions at"
|
||||
echo "boinc/mac_build/HowToBuildBOINC_XCode.rtf or http://boinc.berkeley.edu/trac/wiki/MacBuild"
|
||||
exit 1
|
||||
if [ -d /Developer/SDKs/MacOSX10.3.9.sdk/ ]; then
|
||||
HAS_1039SDK=1
|
||||
else
|
||||
HAS_1039SDK=0
|
||||
echo
|
||||
echo "System 10.3.9 SDK is not available. Building for OS 10.4 and later"
|
||||
echo
|
||||
fi
|
||||
|
||||
echo
|
||||
echo "***************************************************"
|
||||
echo "********** Building PowerPC Application ***********"
|
||||
if [ "$HAS_1039SDK" = "1" ]; then
|
||||
echo "************ for OS 10.3.9 and later **************"
|
||||
else
|
||||
echo "************* for OS 10.4 and later ***************"
|
||||
fi
|
||||
echo "***************************************************"
|
||||
echo
|
||||
|
||||
## PowerPC build for OS 10.3.0 must use GCC-3.3 and MacOSX10.3.9 SDK
|
||||
export PATH=/usr/local/bin:$PATH
|
||||
export CC=/usr/bin/gcc-4.0;export CXX=/usr/bin/g++-4.0
|
||||
export LDFLAGS="-Wl,-arch,ppc"
|
||||
export VARIANTFLAGS="-arch ppc -fvisibility=hidden -fvisibility-inlines-hidden"
|
||||
if [ "$HAS_1039SDK" = "1" ]; then
|
||||
export MACOSX_DEPLOYMENT_TARGET=10.3
|
||||
export CC=/usr/bin/gcc-3.3;export CXX=/usr/bin/g++-3.3
|
||||
export LDFLAGS="-Wl,-syslibroot,/Developer/SDKs/MacOSX10.3.9.sdk -arch ppc"
|
||||
## If your make file passes LDFLAGS directly to ld instead of to gcc, use the following instead:
|
||||
## export LDFLAGS="-syslibroot /Developer/SDKs/MacOSX10.3.9.sdk -arch ppc"
|
||||
export VARIANTFLAGS="-arch ppc -D_NONSTD_SOURCE -isystem /Developer/SDKs/MacOSX10.3.9.sdk"
|
||||
else
|
||||
export MACOSX_DEPLOYMENT_TARGET=10.4
|
||||
fi
|
||||
|
||||
make -f Makefile_mac clean
|
||||
rm -f uc2.o
|
||||
rm -f uc2_graphics.o
|
||||
rm -f uc2
|
||||
rm -f uc2_graphics
|
||||
make -f Makefile_mac all
|
||||
|
||||
if [ $? -ne 0 ]; then exit 1; fi
|
||||
|
@ -74,16 +85,15 @@ echo "******* Building 32-bit Intel Application *********"
|
|||
echo "***************************************************"
|
||||
echo
|
||||
|
||||
## 32-bit Intel build for OS 10.4 must use GCC-4.0 and MacOSX10.4u SDK
|
||||
|
||||
export MACOSX_DEPLOYMENT_TARGET=10.4
|
||||
export CC=/usr/bin/gcc-4.0;export CXX=/usr/bin/g++-4.0
|
||||
export LDFLAGS="-Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk -arch i386"
|
||||
## If your make file passes LDFLAGS directly to ld instead of to gcc, use the following instead:
|
||||
## export LDFLAGS="-syslibroot /Developer/SDKs/MacOSX10.3.9.sdk -arch i386"
|
||||
export VARIANTFLAGS="-isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -fvisibility=hidden -fvisibility-inlines-hidden"
|
||||
export LDFLAGS="-Wl,-arch,i386"
|
||||
export VARIANTFLAGS="-arch i386 -fvisibility=hidden -fvisibility-inlines-hidden"
|
||||
|
||||
make -f Makefile_mac clean
|
||||
rm -f uc2.o
|
||||
rm -f uc2_graphics.o
|
||||
rm -f uc2
|
||||
rm -f uc2_graphics
|
||||
make -f Makefile_mac all
|
||||
|
||||
if [ $? -ne 0 ]; then exit 1; fi
|
||||
|
@ -92,34 +102,29 @@ mkdir i386
|
|||
mv uc2 i386/
|
||||
mv uc2_graphics i386/
|
||||
|
||||
## 64-bit Intel build for OS 10.5 must use GCC-4.0 and MacOSX10.5 SDK
|
||||
echo
|
||||
echo "***************************************************"
|
||||
echo "******* Building 64-bit Intel Application *********"
|
||||
echo "***************************************************"
|
||||
echo
|
||||
|
||||
# Build for x86_64 architecture only if OS 10.5 SDK is present
|
||||
if [ -d /Developer/SDKs/MacOSX10.5.sdk/ ]; then
|
||||
export MACOSX_DEPLOYMENT_TARGET=10.5
|
||||
export CC=/usr/bin/gcc-4.0;export CXX=/usr/bin/g++-4.0
|
||||
export LDFLAGS="-Wl,-arch,x86_64"
|
||||
export VARIANTFLAGS="-arch x86_64 -fvisibility=hidden -fvisibility-inlines-hidden"
|
||||
|
||||
echo
|
||||
echo "***************************************************"
|
||||
echo "******* Building 64-bit Intel Application *********"
|
||||
echo "***************************************************"
|
||||
echo
|
||||
rm -f uc2.o
|
||||
rm -f uc2_graphics.o
|
||||
rm -f uc2
|
||||
rm -f uc2_graphics
|
||||
make -f Makefile_mac all
|
||||
|
||||
export MACOSX_DEPLOYMENT_TARGET=10.5
|
||||
export CC=/usr/bin/gcc-4.0;export CXX=/usr/bin/g++-4.0
|
||||
export LDFLAGS="-Wl,-syslibroot,/Developer/SDKs/MacOSX10.5.sdk -arch x86_64"
|
||||
## If your make file passes LDFLAGS directly to ld instead of to gcc, use the following instead:
|
||||
## export LDFLAGS="-syslibroot /Developer/SDKs/MacOSX10.3.9.sdk -arch x86_64"
|
||||
export VARIANTFLAGS="-isysroot /Developer/SDKs/MacOSX10.5.sdk -arch x86_64 -fvisibility=hidden -fvisibility-inlines-hidden"
|
||||
if [ $? -ne 0 ]; then exit 1; fi
|
||||
|
||||
make -f Makefile_mac clean
|
||||
make -f Makefile_mac all
|
||||
mkdir x86_64
|
||||
mv uc2 x86_64/
|
||||
mv uc2_graphics x86_64/
|
||||
|
||||
if [ $? -ne 0 ]; then exit 1; fi
|
||||
|
||||
mkdir x86_64
|
||||
mv uc2 x86_64/
|
||||
mv uc2_graphics x86_64/
|
||||
|
||||
fi
|
||||
|
||||
echo
|
||||
echo "***************************************************"
|
||||
|
|
|
@ -1,22 +1,23 @@
|
|||
# makefile for uc2 BOINC example application on Macintosh.
|
||||
# This is invoked from MakeMacExample.sh shell script.
|
||||
# It should not be used by itself without the script.
|
||||
# Updated 5/26/09
|
||||
# Updated 2/16/10 for OS 10.6 and XCode 3.2
|
||||
|
||||
BOINC_DIR = ../..
|
||||
BOINC_API_DIR = $(BOINC_DIR)/api
|
||||
BOINC_LIB_DIR = $(BOINC_DIR)/lib
|
||||
BOINC_LIB_LINK_DIR = $(BOINC_DIR)/mac_build/build/Deployment
|
||||
BOINC_BUILD_DIR = $(BOINC_DIR)/mac_build/build/Deployment
|
||||
BOINC_CONFIG_DIR = $(BOINC_DIR)/clientgui/mac
|
||||
FRAMEWORKS_DIR = /System/Library/Frameworks
|
||||
|
||||
CXXFLAGS = $(VARIANTFLAGS) \
|
||||
-g \
|
||||
-DAPP_GRAPHICS \
|
||||
-I$(BOINC_CONFIG_DIR) \
|
||||
-I$(BOINC_DIR) \
|
||||
-I$(BOINC_DIR)/clientgui/mac/ \
|
||||
-I$(BOINC_LIB_DIR) \
|
||||
-I$(BOINC_API_DIR) \
|
||||
-L$(BOINC_LIB_LINK_DIR) \
|
||||
-L$(BOINC_BUILD_DIR) \
|
||||
-L.
|
||||
|
||||
LIBJPEG = ../../../jpeg-6b/libjpeg.a
|
||||
|
@ -32,10 +33,11 @@ all: $(PROGS)
|
|||
clean:
|
||||
/bin/rm -f $(PROGS) $(OBJ)
|
||||
|
||||
uc2: uc2.o $(BOINC_LIB_LINK_DIR)/libboinc_api.a $(BOINC_LIB_LINK_DIR)/libboinc.a
|
||||
uc2: uc2.o $(BOINC_BUILD_DIR)/libboinc_api.a $(BOINC_BUILD_DIR)/libboinc.a
|
||||
$(CXX) $(LDFLAGS) $(CXXFLAGS) -o uc2 uc2.o -lboinc_api -lboinc
|
||||
|
||||
uc2_graphics: uc2_graphics.o $(BOINC_LIB_LINK_DIR)/libboinc.a $(BOINC_LIB_LINK_DIR)/libboinc_graphics2.a
|
||||
uc2_graphics: uc2_graphics.o $(BOINC_BUILD_DIR)/libboinc.a $(BOINC_BUILD_DIR)/libboinc_graphics2.a
|
||||
$(CXX) $(CXXFLAGS) $(LDFLAGS) -o uc2_graphics uc2_graphics.o\
|
||||
-lboinc_graphics2 -lboinc_api -lboinc \
|
||||
-framework AppKit -framework GLUT -framework OpenGL $(LIBJPEG)
|
||||
|
|
@ -1,42 +1,42 @@
|
|||
# stand-alone makefile for uc2 BOINC example application on Macintosh.
|
||||
# Updated 5/26/09
|
||||
# Updated 2/16/10 for OS 10.6 and XCode 3.2
|
||||
#
|
||||
|
||||
BOINC_DIR = ../..
|
||||
BOINC_API_DIR = $(BOINC_DIR)/api
|
||||
BOINC_LIB_DIR = $(BOINC_DIR)/lib
|
||||
BOINC_LIB_LINK_DIR = $(BOINC_DIR)/mac_build/build/Deployment
|
||||
BOINC_BUILD_DIR = $(BOINC_DIR)/mac_build/build/Deployment
|
||||
BOINC_CONFIG_DIR = $(BOINC_DIR)/clientgui/mac
|
||||
FRAMEWORKS_DIR = /System/Library/Frameworks
|
||||
|
||||
CXXFLAGS_ALL = \
|
||||
-g \
|
||||
-DAPP_GRAPHICS \
|
||||
-I$(BOINC_CONFIG_DIR) \
|
||||
-I$(BOINC_DIR) \
|
||||
-I$(BOINC_DIR)/clientgui/mac/ \
|
||||
-I$(BOINC_LIB_DIR) \
|
||||
-I$(BOINC_API_DIR) \
|
||||
-L$(BOINC_LIB_LINK_DIR) \
|
||||
-L$(BOINC_BUILD_DIR) \
|
||||
-L.
|
||||
|
||||
CC_PPC = /usr/bin/gcc-3.3
|
||||
CXX_PPC = /usr/bin/g++-3.3
|
||||
CXXFLAGS_PPC = -arch ppc -D_NONSTD_SOURCE -isystem /Developer/SDKs/MacOSX10.3.9.sdk \
|
||||
-DMAC_OS_X_VERSION_MIN_REQUIRED=1030 $(CXXFLAGS_ALL)
|
||||
LDFLAGS_PPC = -Wl,-syslibroot,/Developer/SDKs/MacOSX10.3.9.sdk,-arch,ppc
|
||||
CC_PPC = /usr/bin/gcc-4.0
|
||||
CXX_PPC = /usr/bin/g++-4.0
|
||||
CXXFLAGS_PPC = -arch ppc -mmacosx-version-min=10.4 \
|
||||
$(CXXFLAGS_ALL) -fvisibility=hidden -fvisibility-inlines-hidden
|
||||
LDFLAGS_PPC = -Wl,-arch,ppc
|
||||
|
||||
|
||||
CC_i386 = /usr/bin/gcc-4.0
|
||||
CXX_i386 = /usr/bin/g++-4.0
|
||||
CXXFLAGS_i386 = -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk \
|
||||
-mmacosx-version-min=10.4 \
|
||||
$(CXXFLAGS_ALL) -fvisibility=hidden -fvisibility-inlines-hidden
|
||||
LDFLAGS_i386 = -Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk,-arch,i386
|
||||
CXXFLAGS_i386 = -arch i386 -mmacosx-version-min=10.4 \
|
||||
$(CXXFLAGS_ALL) -fvisibility=hidden -fvisibility-inlines-hidden
|
||||
LDFLAGS_i386 = -Wl,-arch,i386
|
||||
|
||||
CC_x86_64 = /usr/bin/gcc-4.0
|
||||
CXX_x86_64 = /usr/bin/g++-4.0
|
||||
CXXFLAGS_x86_64 = -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.5.sdk \
|
||||
-mmacosx-version-min=10.5 \
|
||||
$(CXXFLAGS_ALL) -fvisibility=hidden -fvisibility-inlines-hidden
|
||||
LDFLAGS_x86_64 = -Wl,-syslibroot,/Developer/SDKs/MacOSX10.5.sdk,-arch,x86_64
|
||||
CXXFLAGS_x86_64 = -arch x86_64 -mmacosx-version-min=10.5 \
|
||||
$(CXXFLAGS_ALL) -fvisibility=hidden -fvisibility-inlines-hidden
|
||||
LDFLAGS_x86_64 = -Wl,-arch,x86_64
|
||||
|
||||
|
||||
LIBJPEG = ../../../jpeg-6b/libjpeg.a
|
||||
|
@ -75,26 +75,26 @@ uc2_graphics_x86_64.o: uc2_graphics.cpp
|
|||
$(CXX_x86_64) -c $(CXXFLAGS_x86_64) uc2_graphics.cpp -o uc2_graphics_x86_64.o
|
||||
|
||||
|
||||
uc2_ppc: uc2_ppc.o $(BOINC_LIB_LINK_DIR)/libboinc_api.a $(BOINC_LIB_LINK_DIR)/libboinc.a
|
||||
uc2_ppc: uc2_ppc.o $(BOINC_BUILD_DIR)/libboinc_api.a $(BOINC_BUILD_DIR)/libboinc.a
|
||||
$(CXX_PPC) $(CXXFLAGS_PPC) $(LDFLAGS_PPC) -o uc2_ppc uc2_ppc.o -lboinc_api -lboinc
|
||||
|
||||
uc2_graphics_ppc: uc2_graphics_ppc.o $(BOINC_LIB_LINK_DIR)/libboinc.a $(BOINC_LIB_LINK_DIR)/libboinc_graphics2.a
|
||||
uc2_graphics_ppc: uc2_graphics_ppc.o $(BOINC_BUILD_DIR)/libboinc.a $(BOINC_BUILD_DIR)/libboinc_graphics2.a
|
||||
$(CXX_PPC) $(CXXFLAGS_PPC) $(LDFLAGS_PPC) -o uc2_graphics_ppc uc2_graphics_ppc.o\
|
||||
-lboinc_graphics2 -lboinc_api -lboinc \
|
||||
-framework AppKit -framework GLUT -framework OpenGL $(LIBJPEG)
|
||||
|
||||
uc2_i386: uc2_i386.o $(BOINC_LIB_LINK_DIR)/libboinc_api.a $(BOINC_LIB_LINK_DIR)/libboinc.a
|
||||
uc2_i386: uc2_i386.o $(BOINC_BUILD_DIR)/libboinc_api.a $(BOINC_BUILD_DIR)/libboinc.a
|
||||
$(CXX_i386) $(CXXFLAGS_i386) $(LDFLAGS_i386) -o uc2_i386 uc2_i386.o -lboinc_api -lboinc
|
||||
|
||||
uc2_graphics_i386: uc2_graphics_i386.o $(BOINC_LIB_LINK_DIR)/libboinc.a $(BOINC_LIB_LINK_DIR)/libboinc_graphics2.a
|
||||
uc2_graphics_i386: uc2_graphics_i386.o $(BOINC_BUILD_DIR)/libboinc.a $(BOINC_BUILD_DIR)/libboinc_graphics2.a
|
||||
$(CXX_i386) $(CXXFLAGS_i386) $(LDFLAGS_i386) -o uc2_graphics_i386 uc2_graphics_i386.o\
|
||||
-lboinc_graphics2 -lboinc_api -lboinc \
|
||||
-framework AppKit -framework GLUT -framework OpenGL $(LIBJPEG)
|
||||
|
||||
uc2_x86_64: uc2_x86_64.o $(BOINC_LIB_LINK_DIR)/libboinc_api.a $(BOINC_LIB_LINK_DIR)/libboinc.a
|
||||
uc2_x86_64: uc2_x86_64.o $(BOINC_BUILD_DIR)/libboinc_api.a $(BOINC_BUILD_DIR)/libboinc.a
|
||||
$(CXX_x86_64) $(CXXFLAGS_x86_64) $(LDFLAGS_x86_64) -o uc2_x86_64 uc2_x86_64.o -lboinc_api -lboinc
|
||||
|
||||
uc2_graphics_x86_64: uc2_graphics_x86_64.o $(BOINC_LIB_LINK_DIR)/libboinc.a $(BOINC_LIB_LINK_DIR)/libboinc_graphics2.a
|
||||
uc2_graphics_x86_64: uc2_graphics_x86_64.o $(BOINC_BUILD_DIR)/libboinc.a $(BOINC_BUILD_DIR)/libboinc_graphics2.a
|
||||
$(CXX_x86_64) $(CXXFLAGS_x86_64) $(LDFLAGS_x86_64) -o uc2_graphics_x86_64 uc2_graphics_x86_64.o\
|
||||
-lboinc_graphics2 -lboinc_api -lboinc \
|
||||
-framework AppKit -framework GLUT -framework OpenGL $(LIBJPEG)
|
||||
|
|
Loading…
Reference in New Issue