gcc-fat.sh
changeset 382 0940479cefdb
parent 274 f9ae0edd7bfa
equal deleted inserted replaced
381:ebec9d316ad7 382:0940479cefdb
     2 #
     2 #
     3 # Build Universal binaries on Mac OS X, thanks Ryan!
     3 # Build Universal binaries on Mac OS X, thanks Ryan!
     4 #
     4 #
     5 # Usage: ./configure CC="sh gcc-fat.sh" && make && rm -rf x86 x64
     5 # Usage: ./configure CC="sh gcc-fat.sh" && make && rm -rf x86 x64
     6 
     6 
     7 # Intel 32-bit compiler flags (10.4 runtime compatibility)
     7 DEVELOPER="`xcode-select -print-path`/Platforms/MacOSX.platform/Developer"
     8 GCC_COMPILE_X86="gcc-4.0 -arch i386 -mmacosx-version-min=10.4 \
     8 
       
     9 # Intel 32-bit compiler flags (10.6 runtime compatibility)
       
    10 GCC_COMPILE_X86="gcc -arch i386 -mmacosx-version-min=10.6 \
     9 -DMAC_OS_X_VERSION_MIN_REQUIRED=1040 \
    11 -DMAC_OS_X_VERSION_MIN_REQUIRED=1040 \
    10 -nostdinc \
    12 -I/usr/local/include"
    11 -F/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks \
       
    12 -I/Developer/SDKs/MacOSX10.4u.sdk/usr/lib/gcc/i686-apple-darwin10/4.0.1/include \
       
    13 -isystem /Developer/SDKs/MacOSX10.4u.sdk/usr/include"
       
    14 
    13 
    15 GCC_LINK_X86="\
    14 GCC_LINK_X86="-mmacosx-version-min=10.6"
    16 -L/Developer/SDKs/MacOSX10.4u.sdk/usr/lib/gcc/i686-apple-darwin10/4.0.1 \
       
    17 -Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk"
       
    18 
    15 
    19 # Intel 64-bit compiler flags (10.5 runtime compatibility)
    16 # Intel 64-bit compiler flags (10.6 runtime compatibility)
    20 GCC_COMPILE_X64="gcc-4.0 -arch x86_64 -mmacosx-version-min=10.5 \
    17 GCC_COMPILE_X64="gcc -arch x86_64 -mmacosx-version-min=10.6 \
    21 -DMAC_OS_X_VERSION_MIN_REQUIRED=1050 \
    18 -DMAC_OS_X_VERSION_MIN_REQUIRED=1050 \
    22 -nostdinc \
    19 -I/usr/local/include"
    23 -F/Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks \
       
    24 -I/Developer/SDKs/MacOSX10.5.sdk/usr/lib/gcc/i686-apple-darwin10/4.0.1/include \
       
    25 -isystem /Developer/SDKs/MacOSX10.5.sdk/usr/include"
       
    26 
    20 
    27 GCC_LINK_X64="\
    21 GCC_LINK_X64="-mmacosx-version-min=10.6"
    28 -L/Developer/SDKs/MacOSX10.5.sdk/usr/lib/gcc/i686-apple-darwin10/4.0.1/x86_64 \
       
    29 -Wl,-syslibroot,/Developer/SDKs/MacOSX10.5.sdk"
       
    30 
    22 
    31 # Output both PowerPC and Intel object files
    23 # Output both PowerPC and Intel object files
    32 args="$*"
    24 args="$*"
    33 compile=yes
    25 compile=yes
    34 link=yes
    26 link=yes