build-scripts/fatbuild.sh
changeset 4926 ab02a7242f08
parent 4924 455c0dad84df
child 5609 3619f9bc639a
equal deleted inserted replaced
4925:514f811a4887 4926:ab02a7242f08
    13     SDK_PATH=/Developer/SDKs
    13     SDK_PATH=/Developer/SDKs
    14 fi
    14 fi
    15 
    15 
    16 # Generic, cross-platform CFLAGS you always want go here.
    16 # Generic, cross-platform CFLAGS you always want go here.
    17 CFLAGS="-O3 -g -pipe"
    17 CFLAGS="-O3 -g -pipe"
       
    18 
       
    19 # They changed this from "darwin9" to "darwin10" in Xcode 3.2 (Snow Leopard).
       
    20 GCCUSRPATH_PPC=`ls -d $SDK_PATH/MacOSX10.4u.sdk/usr/lib/gcc/powerpc-apple-darwin*/4.0.1`
       
    21 if [ ! -d "$GCCUSRPATH_PPC" ]; then
       
    22     echo "Couldn't find any GCC usr path for 32-bit ppc"
       
    23     exit 1
       
    24 fi
       
    25 GCCUSRPATH_PPC64=`ls -d $SDK_PATH/MacOSX10.5.sdk/usr/lib/gcc/powerpc-apple-darwin*/4.0.1`
       
    26 if [ ! -d "$GCCUSRPATH_PPC64" ]; then
       
    27     echo "Couldn't find any GCC usr path for 64-bit ppc"
       
    28     exit 1
       
    29 fi
    18 
    30 
    19 # PowerPC 32-bit configure flags (10.4 runtime compatibility)
    31 # PowerPC 32-bit configure flags (10.4 runtime compatibility)
    20 # We dynamically load X11, so using the system X11 headers is fine.
    32 # We dynamically load X11, so using the system X11 headers is fine.
    21 CONFIG_PPC="--build=`uname -p`-apple-darwin --host=powerpc-apple-darwin \
    33 CONFIG_PPC="--build=`uname -p`-apple-darwin --host=powerpc-apple-darwin \
    22 --x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib"
    34 --x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib"
    26 CXX_PPC="g++-4.0 -arch ppc"
    38 CXX_PPC="g++-4.0 -arch ppc"
    27 CFLAGS_PPC="-mmacosx-version-min=10.4"
    39 CFLAGS_PPC="-mmacosx-version-min=10.4"
    28 CPPFLAGS_PPC="-DMAC_OS_X_VERSION_MIN_REQUIRED=1040 \
    40 CPPFLAGS_PPC="-DMAC_OS_X_VERSION_MIN_REQUIRED=1040 \
    29 -nostdinc \
    41 -nostdinc \
    30 -F$SDK_PATH/MacOSX10.4u.sdk/System/Library/Frameworks \
    42 -F$SDK_PATH/MacOSX10.4u.sdk/System/Library/Frameworks \
    31 -I$SDK_PATH/MacOSX10.4u.sdk/usr/lib/gcc/powerpc-apple-darwin10/4.0.1/include \
    43 -I$GCCUSRPATH_PPC/include \
    32 -isystem $SDK_PATH/MacOSX10.4u.sdk/usr/include"
    44 -isystem $SDK_PATH/MacOSX10.4u.sdk/usr/include"
    33 
    45 
    34 # PowerPC 32-bit linker flags
    46 # PowerPC 32-bit linker flags
    35 LFLAGS_PPC="-arch ppc -Wl,-headerpad_max_install_names -mmacosx-version-min=10.4 \
    47 LFLAGS_PPC="-arch ppc -Wl,-headerpad_max_install_names -mmacosx-version-min=10.4 \
    36 -F$SDK_PATH/MacOSX10.4u.sdk/System/Library/Frameworks \
    48 -F$SDK_PATH/MacOSX10.4u.sdk/System/Library/Frameworks \
    37 -L$SDK_PATH/MacOSX10.4u.sdk/usr/lib/gcc/powerpc-apple-darwin10/4.0.1 \
    49 -L$GCCUSRPATH_PPC \
    38 -Wl,-syslibroot,$SDK_PATH/MacOSX10.4u.sdk"
    50 -Wl,-syslibroot,$SDK_PATH/MacOSX10.4u.sdk"
    39 
    51 
    40 # PowerPC 64-bit configure flags (10.5 runtime compatibility)
    52 # PowerPC 64-bit configure flags (10.5 runtime compatibility)
    41 # We dynamically load X11, so using the system X11 headers is fine.
    53 # We dynamically load X11, so using the system X11 headers is fine.
    42 CONFIG_PPC64="--build=`uname -p`-apple-darwin --host=powerpc-apple-darwin \
    54 CONFIG_PPC64="--build=`uname -p`-apple-darwin --host=powerpc-apple-darwin \
    47 CXX_PPC64="g++-4.0 -arch ppc64"
    59 CXX_PPC64="g++-4.0 -arch ppc64"
    48 CFLAGS_PPC64="-mmacosx-version-min=10.5"
    60 CFLAGS_PPC64="-mmacosx-version-min=10.5"
    49 CPPFLAGS_PPC64="-DMAC_OS_X_VERSION_MIN_REQUIRED=1050 \
    61 CPPFLAGS_PPC64="-DMAC_OS_X_VERSION_MIN_REQUIRED=1050 \
    50 -nostdinc \
    62 -nostdinc \
    51 -F$SDK_PATH/MacOSX10.5.sdk/System/Library/Frameworks \
    63 -F$SDK_PATH/MacOSX10.5.sdk/System/Library/Frameworks \
    52 -I$SDK_PATH/MacOSX10.5.sdk/usr/lib/gcc/powerpc-apple-darwin10/4.0.1/include \
    64 -I$GCCUSRPATH_PPC64/include \
    53 -isystem $SDK_PATH/MacOSX10.5.sdk/usr/include"
    65 -isystem $SDK_PATH/MacOSX10.5.sdk/usr/include"
    54 
    66 
    55 # PowerPC 64-bit linker flags
    67 # PowerPC 64-bit linker flags
    56 LFLAGS_PPC64="-arch ppc64 -Wl,-headerpad_max_install_names -mmacosx-version-min=10.5 \
    68 LFLAGS_PPC64="-arch ppc64 -Wl,-headerpad_max_install_names -mmacosx-version-min=10.5 \
    57 -F$SDK_PATH/MacOSX10.5.sdk/System/Library/Frameworks \
    69 -F$SDK_PATH/MacOSX10.5.sdk/System/Library/Frameworks \
    58 -L$SDK_PATH/MacOSX10.5.sdk/usr/lib/gcc/powerpc-apple-darwin10/4.0.1/ppc64 \
    70 -L$GCCUSRPATH_PPC64/ppc64 \
    59 -Wl,-syslibroot,$SDK_PATH/MacOSX10.5.sdk"
    71 -Wl,-syslibroot,$SDK_PATH/MacOSX10.5.sdk"
    60 
    72 
    61 # Intel 32-bit configure flags (10.4 runtime compatibility)
    73 # Intel 32-bit configure flags (10.4 runtime compatibility)
    62 # We dynamically load X11, so using the system X11 headers is fine.
    74 # We dynamically load X11, so using the system X11 headers is fine.
    63 CONFIG_X86="--build=`uname -p`-apple-darwin --host=i386-apple-darwin \
    75 CONFIG_X86="--build=`uname -p`-apple-darwin --host=i386-apple-darwin \
    64 --x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib"
    76 --x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib"
    65 
    77 
    66 # Intel 32-bit configure flags (10.4 runtime compatibility)
    78 # They changed this from "darwin9" to "darwin10" in Xcode 3.2 (Snow Leopard).
    67 # We dynamically load X11, so using the system X11 headers is fine.
    79 GCCUSRPATH_X86=`ls -d $SDK_PATH/MacOSX10.4u.sdk/usr/lib/gcc/i686-apple-darwin*/4.0.1`
    68 CONFIG_X86="--build=`uname -p`-apple-darwin --host=i386-apple-darwin \
       
    69 --x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib"
       
    70 
       
    71 # They changed this to "darwin10" in Xcode 3.2 (Snow Leopard).
       
    72 GCCUSRPATH_X86="$SDK_PATH/MacOSX10.4u.sdk/usr/lib/gcc/i686-apple-darwin9/4.0.1"
       
    73 if [ ! -d "$GCCUSRPATH_X86" ]; then
    80 if [ ! -d "$GCCUSRPATH_X86" ]; then
    74     GCCUSRPATH_X86="$SDK_PATH/MacOSX10.4u.sdk/usr/lib/gcc/i686-apple-darwin10/4.0.1"
    81     echo "Couldn't find any GCC usr path for 32-bit x86"
    75 fi
    82     exit 1
    76 if [ ! -d "$GCCUSRPATH_X86" ]; then
    83 fi
    77     echo "Couldn't find any GCC usr path for x86"
    84 GCCUSRPATH_X64=`ls -d $SDK_PATH/MacOSX10.5.sdk/usr/lib/gcc/i686-apple-darwin*/4.0.1`
       
    85 if [ ! -d "$GCCUSRPATH_X64" ]; then
       
    86     echo "Couldn't find any GCC usr path for 64-bit x86"
    78     exit 1
    87     exit 1
    79 fi
    88 fi
    80 
    89 
    81 # Intel 32-bit compiler flags
    90 # Intel 32-bit compiler flags
    82 CC_X86="gcc-4.0 -arch i386"
    91 CC_X86="gcc-4.0 -arch i386"
   104 CXX_X64="g++-4.0 -arch x86_64"
   113 CXX_X64="g++-4.0 -arch x86_64"
   105 CFLAGS_X64="-mmacosx-version-min=10.5"
   114 CFLAGS_X64="-mmacosx-version-min=10.5"
   106 CPPFLAGS_X64="-DMAC_OS_X_VERSION_MIN_REQUIRED=1050 \
   115 CPPFLAGS_X64="-DMAC_OS_X_VERSION_MIN_REQUIRED=1050 \
   107 -nostdinc \
   116 -nostdinc \
   108 -F$SDK_PATH/MacOSX10.5.sdk/System/Library/Frameworks \
   117 -F$SDK_PATH/MacOSX10.5.sdk/System/Library/Frameworks \
   109 -I$SDK_PATH/MacOSX10.5.sdk/usr/lib/gcc/i686-apple-darwin10/4.0.1/include \
   118 -I$GCCUSRPATH_X64/include \
   110 -isystem $SDK_PATH/MacOSX10.5.sdk/usr/include"
   119 -isystem $SDK_PATH/MacOSX10.5.sdk/usr/include"
   111 
   120 
   112 # Intel 64-bit linker flags
   121 # Intel 64-bit linker flags
   113 LFLAGS_X64="-arch x86_64 -Wl,-headerpad_max_install_names -mmacosx-version-min=10.5 \
   122 LFLAGS_X64="-arch x86_64 -Wl,-headerpad_max_install_names -mmacosx-version-min=10.5 \
   114 -F$SDK_PATH/MacOSX10.5.sdk/System/Library/Frameworks \
   123 -F$SDK_PATH/MacOSX10.5.sdk/System/Library/Frameworks \
   115 -L$SDK_PATH/MacOSX10.5.sdk/usr/lib/gcc/i686-apple-darwin10/4.0.1/x86_64 \
   124 -L$GCCUSRPATH_X64/x86_64 \
   116 -Wl,-syslibroot,$SDK_PATH/MacOSX10.5.sdk"
   125 -Wl,-syslibroot,$SDK_PATH/MacOSX10.5.sdk"
   117 
   126 
   118 #
   127 #
   119 # Find the configure script
   128 # Find the configure script
   120 #
   129 #