build-scripts/fatbuild.sh
changeset 1742 af4352da64d8
parent 1741 d67622addf51
child 1743 70a4d819e95e
     1.1 --- a/build-scripts/fatbuild.sh	Thu Apr 27 11:18:03 2006 +0000
     1.2 +++ b/build-scripts/fatbuild.sh	Fri Apr 28 05:38:06 2006 +0000
     1.3 @@ -3,16 +3,14 @@
     1.4  # Build a fat binary on Mac OS X, thanks Ryan!
     1.5  
     1.6  # Number of CPUs (for make -j)
     1.7 -#NCPU=1
     1.8  NCPU=`sysctl -n hw.ncpu`
     1.9 +NJOB=`expr $NCPU + 1`
    1.10  
    1.11 -# !!! FIXME: other CFLAGS?
    1.12  # Generic, cross-platform CFLAGS you always want go here.
    1.13  CFLAGS="-O3 -g -pipe"
    1.14  
    1.15  # PowerPC compiler flags (10.2 runtime compatibility)
    1.16  CC_PPC="gcc-3.3 -arch ppc"
    1.17 -CXX_PPC="g++-3.3 -arch ppc"
    1.18  CFLAGS_PPC=""
    1.19  CPPFLAGS_PPC="-DMAC_OS_X_VERSION_MIN_REQUIRED=1020 \
    1.20  -nostdinc \
    1.21 @@ -28,10 +26,9 @@
    1.22  
    1.23  # Intel compiler flags (10.4 runtime compatibility)
    1.24  CC_X86="gcc-4.0 -arch i386"
    1.25 -CXX_X86="g++-4.0 -arch i386"
    1.26  CFLAGS_X86="-mmacosx-version-min=10.4"
    1.27  CPPFLAGS_X86="-DMAC_OS_X_VERSION_MIN_REQUIRED=1040 \
    1.28 --nostdinc -fvisibility=hidden \
    1.29 +-nostdinc \
    1.30  -F/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks \
    1.31  -I/Developer/SDKs/MacOSX10.4u.sdk/usr/lib/gcc/i686-apple-darwin8/4.0.1/include \
    1.32  -isystem /Developer/SDKs/MacOSX10.4u.sdk/usr/include"
    1.33 @@ -158,10 +155,10 @@
    1.34  #
    1.35  if test x$configure_ppc = xyes; then
    1.36      (cd build/ppc && \
    1.37 -     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
    1.38 +     sh ../../configure --build=`uname -p`-apple-darwin --host=powerpc-apple-darwin CC="$CC_PPC" CFLAGS="$CFLAGS $CFLAGS_PPC" CPPFLAGS="$CPPFLAGS_PPC" LDFLAGS="$LFLAGS_PPC") || exit 2
    1.39  fi
    1.40  if test x$make_ppc = xyes; then
    1.41 -    (cd build/ppc && make -j$NCPU) || exit 3
    1.42 +    (cd build/ppc && ls include && make -j$NJOB) || exit 3
    1.43  fi
    1.44  
    1.45  #
    1.46 @@ -169,10 +166,10 @@
    1.47  #
    1.48  if test x$configure_x86 = xyes; then
    1.49      (cd build/x86 && \
    1.50 -     sh ../../configure --build=`uname -p`-apple-darwin --host=i686-apple-darwin CC="$CC_X86" CXX="$CXX_X86" CFLAGS="$CFLAGS $CFLAGS_X86" CPPFLAGS="$CPPFLAGS_X86" LDFLAGS="$LFLAGS_X86") || exit 2
    1.51 +     sh ../../configure --build=`uname -p`-apple-darwin --host=i386-apple-darwin CC="$CC_X86" CFLAGS="$CFLAGS $CFLAGS_X86" CPPFLAGS="$CPPFLAGS_X86" LDFLAGS="$LFLAGS_X86") || exit 2
    1.52  fi
    1.53  if test x$make_x86 = xyes; then
    1.54 -    (cd build/x86 && make -j$NCPU) || exit 3
    1.55 +    (cd build/x86 && make -j$NJOB) || exit 3
    1.56  fi
    1.57  
    1.58  #