1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-09 17:38:00 +00:00

Enable various features in MinGW builds.

I've reset the baseline to be the version of mingw-w64 that comes with
Ubuntu 14.04. Right now, that means no features need to be omitted; all
you need to do is set TOOLPATH to i686-w64-mingw32- .

I've removed -mno-cygwin without comment. Toolchains which don't support
this flag have been around since at least 2012, so we can probably
assume that no-one cares about older toolchains by now.
This commit is contained in:
Jacob Nevins 2016-04-10 14:40:39 +01:00
parent 371c68e355
commit b3c3871745
3 changed files with 14 additions and 17 deletions

11
README
View File

@ -38,10 +38,13 @@ For building on Windows:
`make -f Makefile.mgw' while in the `windows' subdirectory to
build all the PuTTY binaries.
You'll probably need quite a recent version of the w32api package.
Note that by default the multiple monitor and HTML Help support are
excluded from the Cygwin build, since at the time of writing Cygwin
doesn't include the necessary headers.
MinGW and friends can lag behind other toolchains in their support
for the Windows API. Compile-time levers are provided to exclude
some features; the defaults are set appropriately for the
'mingw-w64' cross-compiler provided with Ubuntu 14.04. If you are
using an older toolchain, you may need to exclude more features;
alternatively, you may find that upgrading to a recent version of
the 'w32api' package helps.
- windows/Makefile.lcc is for lcc-win32. Type `make -f
Makefile.lcc' while in the `windows' subdirectory. (You will

13
Recipe
View File

@ -60,20 +60,14 @@
# full-screen mode (configurable to work on Alt-Enter) will
# not behave usefully in a multi-monitor environment.
#
# Note that this definition is always enabled in the Cygwin
# build, since at the time of writing this <multimon.h> is
# known not to be available in Cygwin.
#
# - COMPAT=/DNO_HTMLHELP (Windows only)
# Disables PuTTY's use of <htmlhelp.h>, which is not available
# with some development environments. The resulting binary
# will only look for an old-style WinHelp file (.HLP/.CNT), and
# will ignore any .CHM file.
#
# Note that this definition is always enabled in the Cygwin
# build, since at the time of writing this <htmlhelp.h> is
# known not to be available in Cygwin (although you can use
# the htmlhelp.h supplied with HTML Help Workshop).
# If you don't have this header, you may be able to use the copy
# supplied with HTML Help Workshop.
#
# - RCFL=/DNO_MANIFESTS (Windows only)
# Disables inclusion of XML application manifests in the PuTTY
@ -101,8 +95,7 @@
#
# - COMPAT=/DNO_SECUREZEROMEMORY (Windows only)
# Disables PuTTY's use of SecureZeroMemory(), which is missing
# from some environments' header files. This is enabled by
# default in the Cygwin Makefile.
# from some environments' header files.
#
# - XFLAGS=/DTELNET_DEFAULT
# Causes PuTTY to default to the Telnet protocol (in the absence

View File

@ -455,6 +455,7 @@ if (defined $makefiles{'cygwin'}) {
"# You can define this path to point at your tools if you need to\n".
"# TOOLPATH = c:\\cygwin\\bin\\ # or similar, if you're running Windows\n".
"# TOOLPATH = /pkg/mingw32msvc/i386-mingw32msvc/bin/\n".
"# TOOLPATH = i686-w64-mingw32-\n".
"CC = \$(TOOLPATH)gcc\n".
"RC = \$(TOOLPATH)windres\n".
"# Uncomment the following two lines to compile under Winelib\n".
@ -463,11 +464,11 @@ if (defined $makefiles{'cygwin'}) {
"# You may also need to tell windres where to find include files:\n".
"# RCINC = --include-dir c:\\cygwin\\include\\\n".
"\n".
&splitline("CFLAGS = -mno-cygwin -Wall -O2 -D_WINDOWS -DDEBUG -DWIN32S_COMPAT".
" -D_NO_OLDNAMES -DNO_MULTIMON -DNO_HTMLHELP -DNO_SECUREZEROMEMORY " .
&splitline("CFLAGS = -Wall -O2 -D_WINDOWS -DDEBUG -DWIN32S_COMPAT".
" -D_NO_OLDNAMES " .
(join " ", map {"-I$dirpfx$_"} @srcdirs)) .
"\n".
"LDFLAGS = -mno-cygwin -s\n".
"LDFLAGS = -s\n".
&splitline("RCFLAGS = \$(RCINC) --define WIN32=1 --define _WIN32=1 ".
"--define WINVER=0x0400 ".(join " ", map {"-I$dirpfx$_"} @srcdirs))."\n".
"\n".