bf1d82
#!/bin/bash
bf1d82
bf1d82
set -e
bf1d82
bf1d82
[ ! -z "$HOST" ] || (echo "host was not set" && false)
bf1d82
bf1d82
mkdir -p "$INST_DIR"
bf1d82
mkdir -p "$DIST_DIR"
bf1d82
export PREFIX="$INST_DIR"
bf1d82
bf1d82
EXTRA_CPP_OPTIONS=
bf1d82
bf1d82
export PATH="/usr/$HOST/bin:/usr/$HOST/sys-root/mingw/bin:$PATH"
bf1d82
export LD_LIBRARY_PATH="/usr/$HOST/sys-root/mingw/lib:$LD_LIBRARY_PATH"
bf1d82
bf1d82
export ADDR2LINE=/usr/bin/$HOST-addr2line
bf1d82
export AS=/usr/bin/$HOST-as
bf1d82
export AR=/usr/bin/$HOST-ar
bf1d82
export CC=/usr/bin/$HOST-gcc
bf1d82
export CXXFILT=/usr/bin/$HOST-c++filt
bf1d82
export CXX=/usr/bin/$HOST-c++
bf1d82
export CPP=/usr/bin/$HOST-cpp
bf1d82
export DLLTOOL=/usr/bin/$HOST-dlltool
bf1d82
export DLLWRAP=/usr/bin/$HOST-dllwrap
bf1d82
export ELFEDIT=/usr/bin/$HOST-elfedit
bf1d82
export FORTRAN=/usr/bin/$HOST-gfortran
bf1d82
export GXX=/usr/bin/$HOST-g++
bf1d82
export GCC=/usr/bin/$HOST-gcc
bf1d82
export GCOV=/usr/bin/$HOST-gcov
bf1d82
export GCOV_TOOL=/usr/bin/$HOST-gcov-tool
bf1d82
export GFORTRAN=/usr/bin/$HOST-gfortran
bf1d82
export GPROF=/usr/bin/$HOST-gprof
bf1d82
export LD=/usr/bin/$HOST-ld
bf1d82
export LD_BFD=/usr/bin/$HOST-ld.bfd
bf1d82
export NM=/usr/bin/$HOST-nm
bf1d82
export OBJCOPY=/usr/bin/$HOST-objcopy
bf1d82
export OBJDUMP=/usr/bin/$HOST-objdump
bf1d82
export PKG_CONFIG=/usr/bin/$HOST-pkg-config
bf1d82
export RANLIB=/usr/bin/$HOST-ranlib
bf1d82
export READELF=/usr/bin/$HOST-readelf
bf1d82
export SIZE=/usr/bin/$HOST-size
bf1d82
export STRINGS=/usr/bin/$HOST-strings
bf1d82
export STRIP=/usr/bin/$HOST-strip
bf1d82
export WINDMC=/usr/bin/$HOST-windmc
bf1d82
export RC=/usr/bin/$HOST-windres
bf1d82
export WINDRES=/usr/bin/$HOST-windres
bf1d82
bf1d82
export LDFLAGS=" -L/usr/$HOST/sys-root/mingw/lib $LDFLAGS"
bf1d82
export CFLAGS=" $EXTRA_CPP_OPTIONS $CFLAGS"
bf1d82
export CPPFLAGS=" $EXTRA_CPP_OPTIONS $CPPFLAGS"
bf1d82
export CXXFLAGS=" $EXTRA_CPP_OPTIONS $CXXFLAGS"
bf1d82
export PKG_CONFIG_PATH="/usr/lib/pkgconfig:/usr/$HOST/sys-root/mingw/lib/pkgconfig"
bf1d82
export PKG_CONFIG_LIBDIR="/usr/$HOST/sys-root/mingw/lib"
bf1d82
export XDG_DATA_DIRS="$XDG_DATA_DIRS"
bf1d82
export CMAKE_INCLUDE_PATH="$CMAKE_INCLUDE_PATH"
bf1d82
export CMAKE_LIBRARY_PATH="/usr/$HOST/sys-root/mingw/lib:$CMAKE_LIBRARY_PATH"
bf1d82
bf1d82
unset EXTRA_CPP_OPTIONS
bf1d82
bf1d82
bf1d82
export PATH="$PREFIX/bin:$PATH"
bf1d82
export LD_LIBRARY_PATH="$PREFIX/lib:$LD_LIBRARY_PATH"
bf1d82
export LDFLAGS="-L$PREFIX/lib $LDFLAGS"
bf1d82
export CFLAGS="-I$PREFIX/include $CFLAGS"
bf1d82
export CPPFLAGS="-I$PREFIX/include $CPPFLAGS"
bf1d82
export CXXFLAGS="-I$PREFIX/include $CXXFLAGS"
bf1d82
export PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig:$PREFIX/share/pkgconfig:$PKG_CONFIG_PATH"
bf1d82
export PKG_CONFIG_LIBDIR="$PREFIX/lib:$PKG_CONFIG_LIBDIR"
bf1d82
export PKG_CONFIG_SYSROOT_DIR="/"
bf1d82
export XDG_DATA_DIRS="$PREFIX/share:$XDG_DATA_DIRS"
bf1d82
#export ACLOCAL_PATH="$PREFIX/share/aclocal:$ACLOCAL_PATH"
bf1d82
export CMAKE_INCLUDE_PATH="$PREFIX/include:$CMAKE_INCLUDE_PATH"
bf1d82
export CMAKE_LIBRARY_PATH="$PREFIX/lib:$CMAKE_LIBRARY_PATH"