
Untitled
By: a guest on
May 2nd, 2012 | syntax:
None | size: 1.40 KB | hits: 11 | expires: Never
#! /bin/bash
#
# Program : mingw32-node-configure
# Authors : Nathan Rajlich (nathan@tootallnate.net)
# Michael Aaron Safyan (michaelsafyan@gmail.com)
# Adam Malcontenti-Wilson (adman.com@gmail.com)
# Synopsis : This program runs the "configure" script for Node.js.
# An install prefix of "/usr/i586-mingw32msvc" is assumed.
unset CPATH
unset C_INCLUDE_PATH
unset CPLUS_INCLUDE_PATH
unset OBJC_INCLUDE_PATH
unset LIBS
export TARGET="i586-mingw32msvc"
export TOOL_PREFIX="$TARGET-"
export SDKROOT="/usr/$TARGET"
if [ ! \( -d "$SDKROOT" \) ] ; then
echo "The mingw32 files could not be found. Folder \"$SDKROOT\" does not exist."
exit 1
fi
if [ ! \( -x "./configure" \) ] ; then
echo "This script must be run in the folder containing the \"configure\" script."
exit 1
fi
export AS="$SDKROOT/bin/as"
export ASCPP="$SDKROOT/bin/as"
export AR="$SDKROOT/bin/ar"
export RANLIB="$SDKROOT/bin/ranlib"
export CPPFLAGS="-I$SDKROOT/include"
export CFLAGS="--sysroot='$SDKROOT' -isystem $SDKROOT/include"
export CXXFLAGS="--sysroot='$SDKROOT' -isystem $SDKROOT/include"
export LDFLAGS="-I$SDKROOT/include -L$SDKROOT/lib"
export CPP="${TOOL_PREFIX}cpp"
export CC="${TOOL_PREFIX}gcc"
export CXX="${TOOL_PREFIX}-g++"
export LD="$SDKROOT/bin/ld"
export STRIP="$SDKROOT/bin/strip"
./configure \
--target="$TARGET" \
--dest-cpu="ia32" \
--dest-os="win" \
--without-snapshot \
$@