Renamed gcc-fat to gcc-fat.sh, added CHANGES entry
authorSam Lantinga <slouken@libsdl.org>
Sun, 30 Apr 2006 08:56:00 +0000
changeset 131df3a2df8ccc0
parent 130 46b2b5c92534
child 132 1cfe0957a376
Renamed gcc-fat to gcc-fat.sh, added CHANGES entry
CHANGES
Makefile.am
gcc-fat
gcc-fat.sh
     1.1 --- a/CHANGES	Sun Apr 30 08:44:09 2006 +0000
     1.2 +++ b/CHANGES	Sun Apr 30 08:56:00 2006 +0000
     1.3 @@ -1,4 +1,7 @@
     1.4  1.2.5:
     1.5 +Sam Lantinga - Sun Apr 30 01:48:40 PDT 2006
     1.6 + * Added gcc-fat.sh for generating Universal binaries on Mac OS X
     1.7 + * Updated libtool support to version 1.5.22
     1.8  Sam Lantinga - Sat Feb  4 15:17:44 PST 2006
     1.9   * Added support for XV thumbnail images
    1.10  Gautier Portet - Fri, 19 Mar 2004 17:35:12 +0100
     2.1 --- a/Makefile.am	Sun Apr 30 08:44:09 2006 +0000
     2.2 +++ b/Makefile.am	Sun Apr 30 08:56:00 2006 +0000
     2.3 @@ -29,7 +29,7 @@
     2.4  	IMG_xxx.c		\
     2.5  	SDL_image.spec		\
     2.6  	SDL_image.spec.in	\
     2.7 -	gcc-fat			\
     2.8 +	gcc-fat.sh		\
     2.9  	autogen.sh
    2.10  
    2.11  libSDL_image_la_LDFLAGS = 	\
     3.1 --- a/gcc-fat	Sun Apr 30 08:44:09 2006 +0000
     3.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.3 @@ -1,110 +0,0 @@
     3.4 -#!/bin/sh
     3.5 -#
     3.6 -# Build Universal binaries on Mac OS X, thanks Ryan!
     3.7 -#
     3.8 -# Usage: ./configure CC="sh gcc-fat" && make && rm -rf ppc x86
     3.9 -
    3.10 -# PowerPC compiler flags (10.2 runtime compatibility)
    3.11 -GCC_COMPILE_PPC="gcc-3.3 -arch ppc \
    3.12 --DMAC_OS_X_VERSION_MIN_REQUIRED=1020 \
    3.13 --nostdinc \
    3.14 --F/Developer/SDKs/MacOSX10.2.8.sdk/System/Library/Frameworks \
    3.15 --I/Developer/SDKs/MacOSX10.2.8.sdk/usr/include/gcc/darwin/3.3 \
    3.16 --isystem /Developer/SDKs/MacOSX10.2.8.sdk/usr/include"
    3.17 -
    3.18 -GCC_LINK_PPC="\
    3.19 --L/Developer/SDKs/MacOSX10.2.8.sdk/usr/lib/gcc/darwin/3.3 \
    3.20 --F/Developer/SDKs/MacOSX10.2.8.sdk/System/Library/Frameworks \
    3.21 --Wl,-syslibroot,/Developer/SDKs/MacOSX10.2.8.sdk"
    3.22 -
    3.23 -# Intel compiler flags (10.4 runtime compatibility)
    3.24 -GCC_COMPILE_X86="gcc-4.0 -arch i386 -mmacosx-version-min=10.4 \
    3.25 --DMAC_OS_X_VERSION_MIN_REQUIRED=1040 \
    3.26 --nostdinc \
    3.27 --F/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks \
    3.28 --I/Developer/SDKs/MacOSX10.4u.sdk/usr/lib/gcc/i686-apple-darwin8/4.0.1/include \
    3.29 --isystem /Developer/SDKs/MacOSX10.4u.sdk/usr/include"
    3.30 -
    3.31 -GCC_LINK_X86="\
    3.32 --L/Developer/SDKs/MacOSX10.4u.sdk/usr/lib/gcc/i686-apple-darwin8/4.0.0 \
    3.33 --Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk"
    3.34 -
    3.35 -# Output both PowerPC and Intel object files
    3.36 -args="$*"
    3.37 -compile=yes
    3.38 -link=yes
    3.39 -while test x$1 != x; do
    3.40 -    case $1 in
    3.41 -        --version) exec gcc $1;;
    3.42 -        -v) exec gcc $1;;
    3.43 -        -V) exec gcc $1;;
    3.44 -        -print-prog-name=*) exec gcc $1;;
    3.45 -        -print-search-dirs) exec gcc $1;;
    3.46 -        -E) GCC_COMPILE_PPC="$GCC_COMPILE_PPC -E"
    3.47 -            GCC_COMPILE_X86="$GCC_COMPILE_X86 -E"
    3.48 -            compile=no; link=no;;
    3.49 -        -c) link=no;;
    3.50 -        -o) output=$2;;
    3.51 -        *.c) source=$1;;
    3.52 -    esac
    3.53 -    shift
    3.54 -done
    3.55 -if test x$link = xyes; then
    3.56 -    GCC_COMPILE_PPC="$GCC_COMPILE_PPC $GCC_LINK_PPC"
    3.57 -    GCC_COMPILE_X86="$GCC_COMPILE_X86 $GCC_LINK_X86"
    3.58 -fi
    3.59 -if test x"$output" = x; then
    3.60 -    if test x$link = xyes; then
    3.61 -        output=a.out
    3.62 -    elif test x$compile = xyes; then
    3.63 -        output=`basename $source .c`.o
    3.64 -    fi
    3.65 -fi
    3.66 -
    3.67 -if test x"$output" != x; then
    3.68 -    dir=ppc/`dirname $output`
    3.69 -    if test -d $dir; then
    3.70 -        :
    3.71 -    else
    3.72 -        mkdir -p $dir
    3.73 -    fi
    3.74 -fi
    3.75 -set -- $args
    3.76 -while test x$1 != x; do
    3.77 -    if test -f "ppc/$1"; then
    3.78 -        ppc_args="$ppc_args ppc/$1"
    3.79 -    else
    3.80 -        ppc_args="$ppc_args $1"
    3.81 -    fi
    3.82 -    shift
    3.83 -done
    3.84 -$GCC_COMPILE_PPC $ppc_args || exit $?
    3.85 -if test x"$output" != x; then
    3.86 -    cp $output ppc/$output
    3.87 -fi
    3.88 -
    3.89 -if test x"$output" != x; then
    3.90 -    dir=x86/`dirname $output`
    3.91 -    if test -d $dir; then
    3.92 -        :
    3.93 -    else
    3.94 -        mkdir -p $dir
    3.95 -    fi
    3.96 -fi
    3.97 -set -- $args
    3.98 -while test x$1 != x; do
    3.99 -    if test -f "x86/$1"; then
   3.100 -        x86_args="$x86_args x86/$1"
   3.101 -    else
   3.102 -        x86_args="$x86_args $1"
   3.103 -    fi
   3.104 -    shift
   3.105 -done
   3.106 -$GCC_COMPILE_X86 $x86_args || exit $?
   3.107 -if test x"$output" != x; then
   3.108 -    cp $output x86/$output
   3.109 -fi
   3.110 -
   3.111 -if test x"$output" != x; then
   3.112 -    lipo -create -o $output ppc/$output x86/$output
   3.113 -fi
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/gcc-fat.sh	Sun Apr 30 08:56:00 2006 +0000
     4.3 @@ -0,0 +1,110 @@
     4.4 +#!/bin/sh
     4.5 +#
     4.6 +# Build Universal binaries on Mac OS X, thanks Ryan!
     4.7 +#
     4.8 +# Usage: ./configure CC="sh gcc-fat.sh" && make && rm -rf ppc x86
     4.9 +
    4.10 +# PowerPC compiler flags (10.2 runtime compatibility)
    4.11 +GCC_COMPILE_PPC="gcc-3.3 -arch ppc \
    4.12 +-DMAC_OS_X_VERSION_MIN_REQUIRED=1020 \
    4.13 +-nostdinc \
    4.14 +-F/Developer/SDKs/MacOSX10.2.8.sdk/System/Library/Frameworks \
    4.15 +-I/Developer/SDKs/MacOSX10.2.8.sdk/usr/include/gcc/darwin/3.3 \
    4.16 +-isystem /Developer/SDKs/MacOSX10.2.8.sdk/usr/include"
    4.17 +
    4.18 +GCC_LINK_PPC="\
    4.19 +-L/Developer/SDKs/MacOSX10.2.8.sdk/usr/lib/gcc/darwin/3.3 \
    4.20 +-F/Developer/SDKs/MacOSX10.2.8.sdk/System/Library/Frameworks \
    4.21 +-Wl,-syslibroot,/Developer/SDKs/MacOSX10.2.8.sdk"
    4.22 +
    4.23 +# Intel compiler flags (10.4 runtime compatibility)
    4.24 +GCC_COMPILE_X86="gcc-4.0 -arch i386 -mmacosx-version-min=10.4 \
    4.25 +-DMAC_OS_X_VERSION_MIN_REQUIRED=1040 \
    4.26 +-nostdinc \
    4.27 +-F/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks \
    4.28 +-I/Developer/SDKs/MacOSX10.4u.sdk/usr/lib/gcc/i686-apple-darwin8/4.0.1/include \
    4.29 +-isystem /Developer/SDKs/MacOSX10.4u.sdk/usr/include"
    4.30 +
    4.31 +GCC_LINK_X86="\
    4.32 +-L/Developer/SDKs/MacOSX10.4u.sdk/usr/lib/gcc/i686-apple-darwin8/4.0.0 \
    4.33 +-Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk"
    4.34 +
    4.35 +# Output both PowerPC and Intel object files
    4.36 +args="$*"
    4.37 +compile=yes
    4.38 +link=yes
    4.39 +while test x$1 != x; do
    4.40 +    case $1 in
    4.41 +        --version) exec gcc $1;;
    4.42 +        -v) exec gcc $1;;
    4.43 +        -V) exec gcc $1;;
    4.44 +        -print-prog-name=*) exec gcc $1;;
    4.45 +        -print-search-dirs) exec gcc $1;;
    4.46 +        -E) GCC_COMPILE_PPC="$GCC_COMPILE_PPC -E"
    4.47 +            GCC_COMPILE_X86="$GCC_COMPILE_X86 -E"
    4.48 +            compile=no; link=no;;
    4.49 +        -c) link=no;;
    4.50 +        -o) output=$2;;
    4.51 +        *.c) source=$1;;
    4.52 +    esac
    4.53 +    shift
    4.54 +done
    4.55 +if test x$link = xyes; then
    4.56 +    GCC_COMPILE_PPC="$GCC_COMPILE_PPC $GCC_LINK_PPC"
    4.57 +    GCC_COMPILE_X86="$GCC_COMPILE_X86 $GCC_LINK_X86"
    4.58 +fi
    4.59 +if test x"$output" = x; then
    4.60 +    if test x$link = xyes; then
    4.61 +        output=a.out
    4.62 +    elif test x$compile = xyes; then
    4.63 +        output=`basename $source .c`.o
    4.64 +    fi
    4.65 +fi
    4.66 +
    4.67 +if test x"$output" != x; then
    4.68 +    dir=ppc/`dirname $output`
    4.69 +    if test -d $dir; then
    4.70 +        :
    4.71 +    else
    4.72 +        mkdir -p $dir
    4.73 +    fi
    4.74 +fi
    4.75 +set -- $args
    4.76 +while test x$1 != x; do
    4.77 +    if test -f "ppc/$1"; then
    4.78 +        ppc_args="$ppc_args ppc/$1"
    4.79 +    else
    4.80 +        ppc_args="$ppc_args $1"
    4.81 +    fi
    4.82 +    shift
    4.83 +done
    4.84 +$GCC_COMPILE_PPC $ppc_args || exit $?
    4.85 +if test x"$output" != x; then
    4.86 +    cp $output ppc/$output
    4.87 +fi
    4.88 +
    4.89 +if test x"$output" != x; then
    4.90 +    dir=x86/`dirname $output`
    4.91 +    if test -d $dir; then
    4.92 +        :
    4.93 +    else
    4.94 +        mkdir -p $dir
    4.95 +    fi
    4.96 +fi
    4.97 +set -- $args
    4.98 +while test x$1 != x; do
    4.99 +    if test -f "x86/$1"; then
   4.100 +        x86_args="$x86_args x86/$1"
   4.101 +    else
   4.102 +        x86_args="$x86_args $1"
   4.103 +    fi
   4.104 +    shift
   4.105 +done
   4.106 +$GCC_COMPILE_X86 $x86_args || exit $?
   4.107 +if test x"$output" != x; then
   4.108 +    cp $output x86/$output
   4.109 +fi
   4.110 +
   4.111 +if test x"$output" != x; then
   4.112 +    lipo -create -o $output ppc/$output x86/$output
   4.113 +fi