2016-02-17 04:34:05 +00:00
|
|
|
|
2016-02-18 02:55:55 +00:00
|
|
|
# Value passed to ./configure for the --host argument. If empty, then
|
|
|
|
# --host will not be passed. Set this if you want to cross-compile.
|
|
|
|
BUILD_HOST=
|
|
|
|
|
|
|
|
# An example of how to cross-compile to mingw32 for Windows builds:
|
2016-02-18 05:03:40 +00:00
|
|
|
#BUILD_HOST=i686-w64-mingw32
|
2016-02-18 02:55:55 +00:00
|
|
|
|
|
|
|
# If we're cross-compiling to a different platform, this should be set
|
|
|
|
# to true. We initialize this based on whether BUILD_HOST has been set.
|
|
|
|
if [ "$BUILD_HOST" != "" ]; then
|
|
|
|
IS_CROSS_COMPILE=true
|
|
|
|
else
|
|
|
|
IS_CROSS_COMPILE=false
|
|
|
|
fi
|
2016-02-17 04:34:05 +00:00
|
|
|
|
2016-02-18 05:37:46 +00:00
|
|
|
# Extra arguments we pass to make when building.
|
|
|
|
MAKE_OPTS=
|
|
|
|
|
|
|
|
# Uncomment to use more threads for faster builds.
|
|
|
|
#MAKE_OPTS=-j4
|
|
|
|
|
2016-02-17 04:34:05 +00:00
|
|
|
# On OS X, we must set additional options: build 32-bit binaries, and the
|
|
|
|
# target API version.
|
|
|
|
if [ $(uname) = "Darwin" ]; then
|
|
|
|
CC="gcc -m32"
|
|
|
|
CXX="g++ -m32"
|
|
|
|
LDFLAGS="-lobjc ${LDFLAGS:-}"
|
|
|
|
MACOSX_DEPLOYMENT_TARGET=10.7
|
2016-02-18 02:55:55 +00:00
|
|
|
export CC CXX LDFLAGS MACOSX_DEPLOYMENT_TARGET
|
|
|
|
|
|
|
|
# Treat this like a cross-compile, since we're building 32-bit:
|
|
|
|
IS_CROSS_COMPILE=true
|
2016-02-17 04:34:05 +00:00
|
|
|
else
|
2016-02-18 02:55:55 +00:00
|
|
|
# TODO: explain what this does
|
2016-02-17 04:34:05 +00:00
|
|
|
LDFLAGS="-Wl,-rpath -Wl,$INSTALL_DIR/lib ${LDFLAGS:-}"
|
2016-02-18 02:55:55 +00:00
|
|
|
export LDFLAGS
|
2016-02-17 04:34:05 +00:00
|
|
|
fi
|
|
|
|
|