Compile PuTTY under Cygwin
November 25, 2016 — 17:16

Author: silver  Category: windows  Comments: Off
  1. Download dev snapshot:
gpg --verify putty-src.zip.gpg putty-src.zip
grep $( sha512sum putty-src.zip ) sha512sums
  1. Run the compile.sh script below
#!/bin/sh

echo
echo "putty needs the following pkgs under cygwin64:"
echo "mingw64-x86_64-headers w32api w32api-headers"
echo
#export PERL5LIB=/usr/lib/perl5/5.22/CPAN
perl mkfiles.pl
sed -i.bak 's/^M//g' licence.h
make distclean
cd windows
make clean -f Makefile.mgw

make -j4 \
TOOLPATH="x86_64-w64-mingw32-" \
CFLAGS="-Wall -O2 -D_WINDOWS -DDEBUG -DWIN32S_COMPAT -D_NO_OLDNAMES -I.././ \
-I../charset/ -I../windows/ -I../unix/ \
-D_WIN32_IE=0x0500 \
-DWINVER=0x0500 -D_WIN32_WINDOWS=0x0410 -D_WIN32_WINNT=0x0500 \
-DNO_MANIFESTS" \
LDFLAGS="-s" \
RCFLAGS="--define WIN32=1 --define _WIN32=1 --define WINVER=0x0400 \
-I.././ -I../charset/ -I../windows/ -I../unix/" \
COMPAT="-DWINSOCK_TWO -DNO_MULTIMON" \
-f Makefile.mgw

It’s also possible to make with version variables:

make VER="-DSNAPSHOT=$(date '+%Y-%m-%d') -DSVN_REV='$(svnversion)' -DMODIFIED" TOOLPATH=i586-mingw32msvc- -f Makefile.cyg putty.exe







We use Matomo free and open source web analytics
We also use Jetpack WordPress.com Stats which honors DNT