Skip to content

Instantly share code, notes, and snippets.

@satoruhiga
Last active April 3, 2016 14:45
Show Gist options
  • Save satoruhiga/7470705 to your computer and use it in GitHub Desktop.
Save satoruhiga/7470705 to your computer and use it in GitHub Desktop.
configure_osx_32bit
#!/bin/bash
ARCH="-arch i386"
SDK="-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk"
SDKLIB="-Wl,-syslibroot,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk"
export MACOSX_DEPLOYMENT_TARGET="10.7"
export CFLAGS="$ARCH $SDK -mmacosx-version-min=$MACOSX_DEPLOYMENT_TARGET"
export CXXFLAGS="$ARCH $SDK -mmacosx-version-min=$MACOSX_DEPLOYMENT_TARGET"
export CPPFLAGS="$ARCH $SDK -mmacosx-version-min=$MACOSX_DEPLOYMENT_TARGET"
export LDFLAGS="$ARCH $SDKLIB -mmacosx-version-min=$MACOSX_DEPLOYMENT_TARGET"
# for brew apple-gcc42
CC="/usr/local/bin/gcc-4.2"
CXX="/usr/local/bin/g++-4.2"
# CC="gcc"
# CXX="g++"
./configure CC=$CC CXX=$CXX $1 $2 $3 $4 $5 $6 $7 $8 $9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment