Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 2nd, 2012  |  syntax: None  |  size: 1.40 KB  |  hits: 11  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. #! /bin/bash
  2.  
  3. #
  4. # Program  : mingw32-node-configure
  5. # Authors  : Nathan Rajlich (nathan@tootallnate.net)
  6. #            Michael Aaron Safyan (michaelsafyan@gmail.com)
  7. #            Adam Malcontenti-Wilson (adman.com@gmail.com)
  8. # Synopsis : This program runs the "configure" script for Node.js.
  9. #            An install prefix of "/usr/i586-mingw32msvc" is assumed.
  10.  
  11. unset CPATH
  12. unset C_INCLUDE_PATH
  13. unset CPLUS_INCLUDE_PATH
  14. unset OBJC_INCLUDE_PATH
  15. unset LIBS
  16.  
  17. export TARGET="i586-mingw32msvc"
  18. export TOOL_PREFIX="$TARGET-"
  19.  
  20. export SDKROOT="/usr/$TARGET"
  21.  
  22. if [ ! \( -d "$SDKROOT" \) ] ; then
  23.    echo "The mingw32 files could not be found. Folder \"$SDKROOT\" does not exist."
  24.    exit 1
  25. fi
  26.  
  27. if [ ! \( -x "./configure" \) ] ; then
  28.     echo "This script must be run in the folder containing the \"configure\" script."
  29.     exit 1
  30. fi
  31.  
  32. export AS="$SDKROOT/bin/as"
  33. export ASCPP="$SDKROOT/bin/as"
  34. export AR="$SDKROOT/bin/ar"
  35. export RANLIB="$SDKROOT/bin/ranlib"
  36. export CPPFLAGS="-I$SDKROOT/include"
  37. export CFLAGS="--sysroot='$SDKROOT' -isystem $SDKROOT/include"
  38. export CXXFLAGS="--sysroot='$SDKROOT' -isystem $SDKROOT/include"
  39. export LDFLAGS="-I$SDKROOT/include -L$SDKROOT/lib"
  40. export CPP="${TOOL_PREFIX}cpp"
  41. export CC="${TOOL_PREFIX}gcc"
  42. export CXX="${TOOL_PREFIX}-g++"
  43. export LD="$SDKROOT/bin/ld"
  44. export STRIP="$SDKROOT/bin/strip"
  45.  
  46. ./configure \
  47.     --target="$TARGET" \
  48.     --dest-cpu="ia32" \
  49.     --dest-os="win" \
  50.     --without-snapshot \
  51.     $@