1 # Global definitions for MacOSX builds
2 # (c) 2011 Angel Vidal ( kry@amule.org )
3 # Public domain. Use at your own risk.
7 # Wouldn't I love to have bash4 on MacOSX (case fallthrough)
9 pn
"-- Begin global def section --"
13 if [ -z $SVN_REPOSITORY ]; then
14 AMULE_FOLDER
=`cd ${SCRIPTDIR}/../../../../; pwd`
15 if [ -f "${AMULE_FOLDER}/src/amule.cpp" ]; then
16 pc
$GREEN "\tSVN repository has not been specified, using detected local sources at \"${AMULE_FOLDER}\""
18 pc
$RED "\tSVN repository has not been specified, and no local sources found at \"${AMULE_FOLDER}\".\n\tPlease specify your aMule source folder by setting the AMULE_FOLDER variable, or call the script with the SVN repository of your choice as a first parameter, or \"public\" to download from our public SVN repository."
23 if [ -z "$BUILD_FOLDER" ]; then
24 if [ -z $SVN_REPOSITORY ]; then
25 BUILD_FOLDER
="$AMULE_FOLDER/build/"
26 mkdir
$BUILD_FOLDER 2>/dev
/null
31 pc
$BLUE "\tAutomatically setting build folder to ${BUILD_FOLDER} - set BUILD_FOLDER to your preferred folder to change this setting."
33 pc
$GREEN "\tSetting build folder to $BUILD_FOLDER"
36 ROOT_FOLDER
=`cd $BUILD_FOLDER; pwd`
38 if [ -z $AMULE_FOLDER ]; then
39 AMULE_FOLDER
="${ROOT_FOLDER}/amule-dev"
42 pc
$GREEN "\tBuild root absolute path is $ROOT_FOLDER"
44 if [ "$SDKNUMBER" == "" ]; then
45 pc
$BLUE "\tAutomatically setting SDK to 10.4u (tiger with i386 and ppc, gcc 4.0) - set SDKNUMBER to your preferred SDK if you want to target it (10.5, 10.6, 10.7) or \"default\" for the default SDK."
60 pc
$RED "Valid SDKNUMBER values are 10.4, 10.5, 10.6, 10.7 and default."
65 pc
$GREEN "\tUsing $SDKNUMBER SDK"
67 if [ "$SDKNUMBER" != "default" ]; then
68 SDK
="-isysroot /Developer/SDKs/MacOSX${SDKRELEASE}.sdk -mmacosx-version-min=$SDKNUMBER"
73 if [ "$UNIVERSAL" == "" ]; then
74 pc
$BLUE "\tAutomatically enabling universal (i386, ppc) build. Set UNIVERSAL=NO to build just for the current architecture."
80 pc
$GREEN "\tDisabling universal build"
81 ARCHCPPFLAGS
="$BUILDARCHS"
85 pc
$GREEN "\tUsing universal build (i386, pcc)"
86 ARCHCPPFLAGS
="-arch i386 -arch ppc"
87 ARCHCONFIGFLAGS
="--enable-universal_binary"
91 pc
$RED "Only the values \"NO\" and \"YES\" are valid for UNIVERSAL"
96 if [ "$STDOUT_FILE" == "" ]; then
97 STDOUT_FILE
=${ROOT_FOLDER}/build_output
100 if [ "$ERROR_FILE" == "" ]; then
101 ERROR_FILE
=${ROOT_FOLDER}/error_output
104 pc
$GREEN "\tErrors will be redirected to $ERROR_FILE, normal build output to $STDOUT_FILE"
106 pn
"-- End global def section --"