moo-poelzi / cygwin-configure

#!/bin/sh

if [ -z $CYGWIN_BIN_DIR ]; then
    CYGWIN_BIN_DIR=/opt/cygwin/bin
fi

TARGET=i686-pc-cygwin

export PATH=/opt/cygwin/i686-pc-cygwin/bin:/opt/cygwin/bin:$PATH

export ADDR2LINE="$CYGWIN_BIN_DIR/$TARGET-addr2line"
export AR="$CYGWIN_BIN_DIR/$TARGET-ar"
export AS="$CYGWIN_BIN_DIR/$TARGET-as"
export CC="$CYGWIN_BIN_DIR/$TARGET-gcc"
export CPP="$CYGWIN_BIN_DIR/$TARGET-cpp"
export CPPFILT="$CYGWIN_BIN_DIR/$TARGET-c++filt"
export CXX="$CYGWIN_BIN_DIR/$TARGET-g++"
export DLLTOOL="$CYGWIN_BIN_DIR/$TARGET-dlltool"
export DLLWRAP="$CYGWIN_BIN_DIR/$TARGET-dllwrap"
export GCOV="$CYGWIN_BIN_DIR/$TARGET-gcov"
export LD="$CYGWIN_BIN_DIR/$TARGET-ld"
export NM="$CYGWIN_BIN_DIR/$TARGET-nm"
export OBJCOPY="$CYGWIN_BIN_DIR/$TARGET-objcopy"
export OBJDUMP="$CYGWIN_BIN_DIR/$TARGET-objdump"
export RANLIB="$CYGWIN_BIN_DIR/$TARGET-ranlib"
export READELF="$CYGWIN_BIN_DIR/$TARGET-readelf"
export SIZE="$CYGWIN_BIN_DIR/$TARGET-size"
export STRINGS="$CYGWIN_BIN_DIR/$TARGET-strings"
export STRIP="$CYGWIN_BIN_DIR/$TARGET-strip"
export WINDRES="$CYGWIN_BIN_DIR/$TARGET-windres"

export CFLAGS="${CFLAGS:-"-O2 -g"} -mms-bitfields -march=i686"
export CXXFLAGS="${CFLAGS:-"-O2 -g"} -mms-bitfields -march=i686"

if [ "x$CONFIGURE" = "x" ]; then
    CONFIGURE="configure"
    if [ ! -e $CONFIGURE ]; then
        CONFIGURE=`dirname $0`/configure
    fi
    if [ ! -e $CONFIGURE ]; then
        echo "Can't find configure script"
        exit 1
    fi
fi

sh $CONFIGURE --target=$TARGET --host=$TARGET $*
exit $?
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.