build-scripts/fatbuild.sh
changeset 1799 50e9cca3fe7b
parent 1744 7f39af143e38
child 2047 9b7c0ff4977f
child 3913 9e454eb693a5
equal deleted inserted replaced
1798:49b4b8413734 1799:50e9cca3fe7b
     8 #NJOB=`expr $NCPU + 1`
     8 #NJOB=`expr $NCPU + 1`
     9 
     9 
    10 # Generic, cross-platform CFLAGS you always want go here.
    10 # Generic, cross-platform CFLAGS you always want go here.
    11 CFLAGS="-O3 -g -pipe"
    11 CFLAGS="-O3 -g -pipe"
    12 
    12 
    13 # PowerPC compiler flags (10.2 runtime compatibility)
    13 # PowerPC configure flags (10.2 runtime compatibility)
       
    14 # We dynamically load X11, so using the system X11 headers is fine.
       
    15 CONFIG_PPC="--build=`uname -p`-apple-darwin --host=powerpc-apple-darwin \
       
    16 --x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib"
       
    17 
       
    18 # PowerPC compiler flags
    14 CC_PPC="gcc-3.3 -arch ppc"
    19 CC_PPC="gcc-3.3 -arch ppc"
    15 CXX_PPC="g++-3.3 -arch ppc"
    20 CXX_PPC="g++-3.3 -arch ppc"
    16 CFLAGS_PPC=""
    21 CFLAGS_PPC=""
    17 CPPFLAGS_PPC="-DMAC_OS_X_VERSION_MIN_REQUIRED=1020 \
    22 CPPFLAGS_PPC="-DMAC_OS_X_VERSION_MIN_REQUIRED=1020 \
    18 -nostdinc \
    23 -nostdinc \
    24 LFLAGS_PPC="-arch ppc \
    29 LFLAGS_PPC="-arch ppc \
    25 -L/Developer/SDKs/MacOSX10.2.8.sdk/usr/lib/gcc/darwin/3.3 \
    30 -L/Developer/SDKs/MacOSX10.2.8.sdk/usr/lib/gcc/darwin/3.3 \
    26 -F/Developer/SDKs/MacOSX10.2.8.sdk/System/Library/Frameworks \
    31 -F/Developer/SDKs/MacOSX10.2.8.sdk/System/Library/Frameworks \
    27 -Wl,-syslibroot,/Developer/SDKs/MacOSX10.2.8.sdk"
    32 -Wl,-syslibroot,/Developer/SDKs/MacOSX10.2.8.sdk"
    28 
    33 
    29 # Intel compiler flags (10.4 runtime compatibility)
    34 # Intel configure flags (10.4 runtime compatibility)
       
    35 # We dynamically load X11, so using the system X11 headers is fine.
       
    36 CONFIG_X86="--build=`uname -p`-apple-darwin --host=i386-apple-darwin \
       
    37 --x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib"
       
    38 
       
    39 # Intel compiler flags
    30 CC_X86="gcc-4.0 -arch i386"
    40 CC_X86="gcc-4.0 -arch i386"
    31 CXX_X86="g++-4.0 -arch i386"
    41 CXX_X86="g++-4.0 -arch i386"
    32 CFLAGS_X86="-mmacosx-version-min=10.4"
    42 CFLAGS_X86="-mmacosx-version-min=10.4"
    33 CPPFLAGS_X86="-DMAC_OS_X_VERSION_MIN_REQUIRED=1040 \
    43 CPPFLAGS_X86="-DMAC_OS_X_VERSION_MIN_REQUIRED=1040 \
    34 -nostdinc \
    44 -nostdinc \
   156 #
   166 #
   157 # Build the PowerPC binary
   167 # Build the PowerPC binary
   158 #
   168 #
   159 if test x$configure_ppc = xyes; then
   169 if test x$configure_ppc = xyes; then
   160     (cd build/ppc && \
   170     (cd build/ppc && \
   161      sh ../../configure --build=`uname -p`-apple-darwin --host=powerpc-apple-darwin CC="$CC_PPC" CXX="$CXX_PPC" CFLAGS="$CFLAGS $CFLAGS_PPC" CPPFLAGS="$CPPFLAGS_PPC" LDFLAGS="$LFLAGS_PPC") || exit 2
   171      sh ../../configure $CONFIG_PPC CC="$CC_PPC" CXX="$CXX_PPC" CFLAGS="$CFLAGS $CFLAGS_PPC" CPPFLAGS="$CPPFLAGS_PPC" LDFLAGS="$LFLAGS_PPC") || exit 2
   162 fi
   172 fi
   163 if test x$make_ppc = xyes; then
   173 if test x$make_ppc = xyes; then
   164     (cd build/ppc && ls include && make -j$NJOB) || exit 3
   174     (cd build/ppc && ls include && make -j$NJOB) || exit 3
   165 fi
   175 fi
   166 
   176 
   167 #
   177 #
   168 # Build the Intel binary
   178 # Build the Intel binary
   169 #
   179 #
   170 if test x$configure_x86 = xyes; then
   180 if test x$configure_x86 = xyes; then
   171     (cd build/x86 && \
   181     (cd build/x86 && \
   172      sh ../../configure --build=`uname -p`-apple-darwin --host=i386-apple-darwin CC="$CC_X86" CXX="$CXX_X86" CFLAGS="$CFLAGS $CFLAGS_X86" CPPFLAGS="$CPPFLAGS_X86" LDFLAGS="$LFLAGS_X86") || exit 2
   182      sh ../../configure $CONFIG_X86 CC="$CC_X86" CXX="$CXX_X86" CFLAGS="$CFLAGS $CFLAGS_X86" CPPFLAGS="$CPPFLAGS_X86" LDFLAGS="$LFLAGS_X86") || exit 2
   173 fi
   183 fi
   174 if test x$make_x86 = xyes; then
   184 if test x$make_x86 = xyes; then
   175     (cd build/x86 && make -j$NJOB) || exit 3
   185     (cd build/x86 && make -j$NJOB) || exit 3
   176 fi
   186 fi
   177 
   187