Blame win/toolchain.sh

87fe10
#!/bin/bash
87fe10
87fe10
function toolchain() {
87fe10
	if [ -z "$INITIAL_PATH" ]; then
87fe10
		export INITIAL_PATH="$PATH"
87fe10
		export INITIAL_LD_LIBRARY_PATH="$LD_LIBRARY_PATH"
87fe10
		export INITIAL_LDFLAGS="$INITIAL_LDFLAGS"
87fe10
	fi
87fe10
87fe10
	export HOST="$1"
87fe10
	local PREFIX="/usr/$HOST"
1b8859
	local BINPREFIX="/usr/bin/$HOST-"
1b8859
	if [ -z "$HOST" ]; then
1b8859
		PREFIX="/usr"
1b8859
		BINPREFIX="/usr/bin/"
1b8859
	fi
87fe10
87fe10
	#export PATH="$PREFIX/bin:$INITIAL_PATH"
87fe10
	#export LD_LIBRARY_PATH="$PREFIX/lib:$INITIAL_LD_LIBRARY_PATH"
87fe10
1b8859
	export ADDR2LINE=${BINPREFIX}addr2line
1b8859
	export AS=${BINPREFIX}as
1b8859
	export AR=${BINPREFIX}ar
1b8859
	export CC=${BINPREFIX}gcc
1b8859
	export CXXFILT=${BINPREFIX}c++filt
1b8859
	export CXX=${BINPREFIX}c++
1b8859
	export CPP=${BINPREFIX}cpp
1b8859
	export DLLTOOL=${BINPREFIX}dlltool
1b8859
	export DLLWRAP=${BINPREFIX}dllwrap
1b8859
	export ELFEDIT=${BINPREFIX}elfedit
1b8859
	export FORTRAN=${BINPREFIX}gfortran
1b8859
	export GXX=${BINPREFIX}g++
1b8859
	export GCC=${BINPREFIX}gcc
1b8859
	export GCOV=${BINPREFIX}gcov
1b8859
	export GCOV_TOOL=${BINPREFIX}gcov-tool
1b8859
	export GFORTRAN=${BINPREFIX}gfortran
1b8859
	export GPROF=${BINPREFIX}gprof
1b8859
	export LD=${BINPREFIX}ld
1b8859
	export LD_BFD=${BINPREFIX}ld.bfd
1b8859
	export NM=${BINPREFIX}nm
1b8859
	export OBJCOPY=${BINPREFIX}objcopy
1b8859
	export OBJDUMP=${BINPREFIX}objdump
1b8859
	export RANLIB=${BINPREFIX}ranlib
1b8859
	export READELF=${BINPREFIX}readelf
1b8859
	export SIZE=${BINPREFIX}size
1b8859
	export STRINGS=${BINPREFIX}strings
1b8859
	export STRIP=${BINPREFIX}strip
1b8859
	export WINDMC=${BINPREFIX}windmc
1b8859
	export RC=${BINPREFIX}windres
1b8859
	export WINDRES=${BINPREFIX}windres
87fe10
87fe10
	#export LDFLAGS=" -L$PREFIX/lib $INITIAL_LDFLAGS"
87fe10
}