Skip to content

Instantly share code, notes, and snippets.

@witwall
Created December 25, 2014 04:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save witwall/e78213dd3c4b4e5f199c to your computer and use it in GitHub Desktop.
Save witwall/e78213dd3c4b4e5f199c to your computer and use it in GitHub Desktop.
Howto: cross-compiling tinc for Windows under Linux using MinGW http://mosestech.com/development/howto-cross-compiling-tinc-for-windows-under-linux-using-mingw
#for more info please visit
#http://mosestech.com/development/howto-cross-compiling-tinc-for-windows-under-linux-using-mingw
#
sudo apt-get install mingw-w64 git-core quilt dpkg-dev autoconf texinfo
sudo apt-get build-dep tinc
mkdir $HOME/mingw
cd $HOME/mingw
apt-get source openssl liblzo2-dev zlib1g-dev
git clone git://tinc-vpn.org/tinc
mkdir $HOME/bin
cat >$HOME/bin/mingw << 'EOF'
#!/bin/sh
PREFIX=i686-w64-mingw32
export CC=$PREFIX-gcc
export CXX=$PREFIX-g++
export CPP=$PREFIX-cpp
export RANLIB=$PREFIX-ranlib
export PATH="/usr/$PREFIX/bin:$PATH"
exec "$@"
EOF
chmod u+x $HOME/bin/mingw
export PATH="$HOME/bin:$PATH"
#Compiling LZO
cd $HOME/mingw/lzo2-2.06
./configure --host=i686-w64-mingw32
make
DESTDIR=$HOME/mingw make install
#Compiling Zlib
cd $HOME/mingw/zlib-1.2.8.dfsg
mingw ./configure --static
mingw make libz.a
DESTDIR=$HOME/mingw mingw make install
#Compiling OpenSSL
cd $HOME/mingw/openssl-1.0.1f
quilt pop -a
mingw ./Configure --openssldir=$HOME/mingw/usr/local mingw
mingw make
mingw make install_sw
#Compiling tinc
cd $HOME/mingw/tinc
autoreconf -fsi
./configure --host=i686-w64-mingw32 --with-zlib=$HOME/mingw/usr/local
make
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment