Increase FONT_MAXNO from 0x2f to 0x40, to ensure the fonts[] array
[u/mdw/putty] / Recipe
CommitLineData
7603011f 1# -*- makefile -*-
2#
3# This file describes which PuTTY programs are made up from which
4# object and resource files. It is processed into the various
5# Makefiles by means of a Perl script. Makefile changes should
6# really be made by editing this file and/or the Perl script, not
7# by editing the actual Makefiles.
8
e35fb54b 9# ------------------------------------------------------------
10# Top-level configuration.
11
12# Overall project name.
13!name putty
14# Locations and types of output Makefiles.
6da41155 15!makefile vc windows/Makefile.vc
16!makefile vcproj windows/MSVC
17!makefile cygwin windows/Makefile.cyg
18!makefile borland windows/Makefile.bor
19!makefile lcc windows/Makefile.lcc
e35fb54b 20!makefile gtk unix/Makefile.gtk
b89e7e07 21!makefile unix unix/Makefile.ux
44747c53 22!makefile am unix/Makefile.am
1ddda1ca 23!makefile osx macosx/Makefile
985b6440 24!makefile devcppproj windows/DEVCPP
cdd310bb 25# Source directories.
26!srcdir charset/
6da41155 27!srcdir windows/
cdd310bb 28!srcdir unix/
1ddda1ca 29!srcdir macosx/
e35fb54b 30
7603011f 31# Help text added to the top of each Makefile, with /D converted
32# into -D as appropriate for the particular Makefile.
33
34!begin help
35#
36# Extra options you can set:
37#
976374cd 38# - VER="/DSNAPSHOT=1999-01-25 /DSVN_REV=1234"
7603011f 39# Generates executables whose About box report them as being a
976374cd 40# development snapshot. SVN_REV is a Subversion revision number.
7603011f 41#
42# - VER=/DRELEASE=0.43
43# Generates executables whose About box report them as being a
44# release version.
45#
d2ab2f0b 46# - COMPAT=/DAUTO_WINSOCK (Windows only)
7603011f 47# Causes PuTTY to assume that <windows.h> includes its own WinSock
48# header file, so that it won't try to include <winsock.h>.
49#
d2ab2f0b 50# - COMPAT=/DWINSOCK_TWO (Windows only)
7603011f 51# Causes the PuTTY utilities to include <winsock2.h> instead of
52# <winsock.h>, except Plink which _needs_ WinSock 2 so it already
53# does this.
54#
d2ab2f0b 55# - COMPAT=/DNO_SECURITY (Windows only)
7603011f 56# Disables Pageant's use of <aclapi.h>, which is not available
7c521ac9 57# with some development environments (such as older versions of
58# the Cygwin/mingw GNU toolchain). This means that Pageant
7603011f 59# won't care about the local user ID of processes accessing it; a
60# version of Pageant built with this option will therefore refuse
61# to run under NT-series OSes on security grounds (although it
62# will run fine on Win95-series OSes where there is no access
63# control anyway).
64#
d2ab2f0b 65# - COMPAT=/DNO_MULTIMON (Windows only)
7603011f 66# Disables PuTTY's use of <multimon.h>, which is not available
67# with some development environments. This means that PuTTY's
68# full-screen mode (configurable to work on Alt-Enter) will
69# not behave usefully in a multi-monitor environment.
70#
71# Note that this definition is always enabled in the Cygwin
72# build, since at the time of writing this <multimon.h> is
73# known not to be available in Cygwin.
74#
db6452be 75# - COMPAT=/DNO_HTMLHELP (Windows only)
76# Disables PuTTY's use of <htmlhelp.h>, which is not available
77# with some development environments. The resulting binary
78# will only look for an old-style WinHelp file (.HLP/.CNT), and
79# will ignore any .CHM file.
80#
81# Note that this definition is always enabled in the Cygwin
82# build, since at the time of writing this <htmlhelp.h> is
85aa0836 83# known not to be available in Cygwin (although you can use
84# the htmlhelp.h supplied with HTML Help Workshop).
db6452be 85#
4e95a413 86# - RCFL=/DNO_MANIFESTS (Windows only)
d2ab2f0b 87# Disables inclusion of XML application manifests in the PuTTY
88# binaries. This may be necessary to build for 64-bit Windows;
89# the manifests are only included to use the XP GUI style on
90# Windows XP, and the architecture tags are a lie on 64-bit.
91#
05581745 92# - COMPAT=/DNO_IPV6
93# Disables PuTTY's ability to make IPv6 connections, enabling
94# it to compile under development environments which do not
95# support IPv6 in their header files.
96#
42af6a67 97# - COMPAT=/DNO_GSSAPI
98# Disables PuTTY's ability to use GSSAPI functions for
99# authentication and key exchange.
100#
b3d375b2 101# - COMPAT=/DSTATIC_GSSAPI
102# Causes PuTTY to try to link statically against the GSSAPI
103# library instead of the default of doing it at run time.
104#
d2ab2f0b 105# - COMPAT=/DMSVC4 (Windows only)
7603011f 106# - RCFL=/DMSVC4
107# Makes a couple of minor changes so that PuTTY compiles using
108# MSVC 4. You will also need /DNO_SECURITY and /DNO_MULTIMON.
109#
d2ab2f0b 110# - RCFL=/DASCIICTLS (Windows only)
7603011f 111# Uses ASCII rather than Unicode to specify the tab control in
112# the resource file. Probably most useful when compiling with
113# Cygnus/mingw32, whose resource compiler may have less of a
114# problem with it.
115#
540bb4b5 116# - COMPAT=/DNO_SECUREZEROMEMORY (Windows only)
117# Disables PuTTY's use of SecureZeroMemory(), which is missing
118# from some environments' header files. This is enabled by
119# default in the Cygwin Makefile.
120#
4044fc45 121# - XFLAGS=/DTELNET_DEFAULT
122# Causes PuTTY to default to the Telnet protocol (in the absence
123# of Default Settings and so on to the contrary). Normally PuTTY
124# will default to SSH.
125#
7603011f 126# - XFLAGS=/DDEBUG
127# Causes PuTTY to enable internal debugging.
128#
129# - XFLAGS=/DMALLOC_LOG
130# Causes PuTTY to emit a file called putty_mem.log, logging every
131# memory allocation and free, so you can track memory leaks.
132#
d2ab2f0b 133# - XFLAGS=/DMINEFIELD (Windows only)
7603011f 134# Causes PuTTY to use a custom memory allocator, similar in
135# concept to Electric Fence, in place of regular malloc(). Wastes
136# huge amounts of RAM, but should cause heap-corruption bugs to
137# show up as GPFs at the point of failure rather than appearing
138# later on as second-level damage.
139#
140!end
141
e35fb54b 142# ------------------------------------------------------------
143# Additional text added verbatim to each individual Makefile.
144
145# Hack to force version.o to be rebuilt always.
146!begin vc
147version.obj: *.c *.h *.rc
d8284c29 148 cl $(VER) $(CFLAGS) /c ..\version.c
e35fb54b 149!end
6da41155 150!specialobj vc version
e35fb54b 151!begin cygwin
6da41155 152version.o: FORCE
d8284c29 153 $(CC) $(COMPAT) $(XFLAGS) $(CFLAGS) $(VER) -c ../version.c
e35fb54b 154!end
6da41155 155!specialobj cygwin version
e35fb54b 156!begin borland
157version.obj: FORCE
d8284c29 158 bcc32 $(VER) $(CFLAGS) /c ..\version.c
e35fb54b 159!end
6da41155 160!specialobj borland version
e35fb54b 161!begin lcc
0aafb388 162version.obj: FORCE
d8284c29 163 lcc $(VER) $(CFLAGS) /c ..\version.c
e35fb54b 164!end
6da41155 165!specialobj lcc version
e35fb54b 166# For Unix, we also need the gross MD5 hack that causes automatic
167# version number selection in release source archives.
168!begin gtk
976374cd 169version.o: FORCE
e35fb54b 170 if test -z "$(VER)" && (cd ..; md5sum -c manifest); then \
d8284c29 171 $(CC) $(COMPAT) $(XFLAGS) $(CFLAGS) `cat ../version.def` -c ../version.c; \
e35fb54b 172 else \
d8284c29 173 $(CC) $(COMPAT) $(XFLAGS) $(CFLAGS) $(VER) -c ../version.c; \
e35fb54b 174 fi
175!end
6da41155 176!specialobj gtk version
44747c53 177# In the automake build, we have to do the whole job by supplying
178# extra CFLAGS, so we have to put the if statement inside one big
179# backtick expression. We also force rebuilding via a -D option that
180# makes version.o include empty.h, which we construct ourselves and
181# touch whenever any source file is updated.
182!cflags am version $(VER) -DINCLUDE_EMPTY_H `if test -z "$(VER)" && (cd $(srcdir)/..; md5sum -c manifest >/dev/null 2>&1); then cat $(srcdir)/../version.def; else echo "$(VER)"; fi`
183!begin am
184BUILT_SOURCES = empty.h
44747c53 185empty.h: $(allsources)
c0458cfc 186 echo '/* Empty file touched by automake makefile to force rebuild of version.o */' >$@
44747c53 187
188!end
c0458cfc 189!begin >empty.h
190/* Empty file touched by automake makefile to force rebuild of version.o */
191!end
e35fb54b 192
976374cd 193# Add VER to Windows resource targets, and force them to be rebuilt every
194# time, on the assumption that they will contain version information.
195!begin vc vars
3982a765 196CFLAGS = $(CFLAGS) /DHAS_GSSAPI /DSECURITY_WIN32
976374cd 197RCFLAGS = $(RCFLAGS) $(VER)
198!end
199!begin cygwin vars
13741c7e 200CFLAGS += -DSECURITY_WIN32
6df8f781 201# XXX GNU-ism, but it's probably all right for a Cygwin/MinGW Makefile.
976374cd 202RCFLAGS += $(patsubst -D%,--define %,$(VER))
203!end
204!begin borland vars
205# Borland doesn't support +=. This probably shouldn't work, but seems to.
206RCFLAGS = $(RCFLAGS) $(VER)
207!end
208!begin lcc vars
209RCFLAGS += $(VER)
210!end
211!forceobj putty.res
212!forceobj puttytel.res
213!forceobj plink.res
214!forceobj pscp.res
215!forceobj psftp.res
216!forceobj pageant.res
217!forceobj puttygen.res
218
e35fb54b 219# `make install' target for Unix.
220!begin gtk
221install:
cd99cb07 222 mkdir -p $(DESTDIR)$(bindir) $(DESTDIR)$(man1dir)
e35fb54b 223 $(INSTALL_PROGRAM) -m 755 plink $(DESTDIR)$(bindir)/plink
224 $(INSTALL_PROGRAM) -m 755 pscp $(DESTDIR)$(bindir)/pscp
225 $(INSTALL_PROGRAM) -m 755 psftp $(DESTDIR)$(bindir)/psftp
226 $(INSTALL_PROGRAM) -m 755 pterm $(DESTDIR)$(bindir)/pterm
e693a2d9 227 if test -n "$(UTMP_GROUP)"; then \
228 chgrp $(UTMP_GROUP) $(DESTDIR)$(bindir)/pterm && \
229 chmod 2755 $(DESTDIR)$(bindir)/pterm; \
230 elif test -n "$(UTMP_USER)"; then \
231 chown $(UTMP_USER) $(DESTDIR)$(bindir)/pterm && \
232 chmod 4755 $(DESTDIR)$(bindir)/pterm; \
233 fi
e35fb54b 234 $(INSTALL_PROGRAM) -m 755 putty $(DESTDIR)$(bindir)/putty
235 $(INSTALL_PROGRAM) -m 755 puttygen $(DESTDIR)$(bindir)/puttygen
236 $(INSTALL_PROGRAM) -m 755 puttytel $(DESTDIR)$(bindir)/puttytel
237 $(INSTALL_DATA) -m 644 ../doc/plink.1 $(DESTDIR)$(man1dir)/plink.1
238 $(INSTALL_DATA) -m 644 ../doc/pscp.1 $(DESTDIR)$(man1dir)/pscp.1
239 $(INSTALL_DATA) -m 644 ../doc/psftp.1 $(DESTDIR)$(man1dir)/psftp.1
240 $(INSTALL_DATA) -m 644 ../doc/pterm.1 $(DESTDIR)$(man1dir)/pterm.1
241 $(INSTALL_DATA) -m 644 ../doc/putty.1 $(DESTDIR)$(man1dir)/putty.1
242 $(INSTALL_DATA) -m 644 ../doc/puttygen.1 $(DESTDIR)$(man1dir)/puttygen.1
243 $(INSTALL_DATA) -m 644 ../doc/puttytel.1 $(DESTDIR)$(man1dir)/puttytel.1
244
245install-strip:
246 $(MAKE) install INSTALL_PROGRAM="$(INSTALL_PROGRAM) -s"
247!end
77603464 248!begin osx vars
1ddda1ca 249CFLAGS += -DMACOSX
250!end
e35fb54b 251
44747c53 252# List the man pages for the automake makefile.
253!begin am
254man1_MANS = ../doc/plink.1 ../doc/pscp.1 ../doc/psftp.1 ../doc/pterm.1 \
255 ../doc/putty.1 ../doc/puttygen.1 ../doc/puttytel.1
256!end
257
258# In automake, chgrp/chmod pterm after installation, if configured to.
259!begin am
260if HAVE_SETID_CMD
261install-exec-local:
262 @SETID_CMD@ $(bindir)/pterm
263 chmod @SETID_MODE@ $(bindir)/pterm
264endif
265!end
266
8f5f26d2 267# Random symbols.
268!begin cygwin vars
269# _WIN32_IE is required to expose identifiers that only make sense on
270# systems with IE5+ installed, such as some arguments to SHGetFolderPath().
09644e07 271# WINVER etc perform a similar function for FlashWindowEx().
8f5f26d2 272CFLAGS += -D_WIN32_IE=0x0500
09644e07 273CFLAGS += -DWINVER=0x0500 -D_WIN32_WINDOWS=0x0410 -D_WIN32_WINNT=0x0500
8f5f26d2 274!end
275
e35fb54b 276# ------------------------------------------------------------
7603011f 277# Definitions of object groups. A group name, followed by an =,
278# followed by any number of objects or other already-defined group
279# names. A line beginning `+' is assumed to continue the previous
280# line.
281
f0fccd51 282# Terminal emulator and its (platform-independent) dependencies.
283TERMINAL = terminal wcwidth ldiscucs logging tree234 minibidi
4a693cfc 284 + config dialog conf
f0fccd51 285
7603011f 286# GUI front end and terminal emulator (putty, puttytel).
6da41155 287GUITERM = TERMINAL window windlg winctrls sizetip winucs winprint
073e9f42 288 + winutils wincfg sercfg winhelp winjump
7603011f 289
f5dd8adb 290# Same thing on Unix.
aef05b78 291UXTERM = TERMINAL uxcfg sercfg uxucs uxprint timing
f160b7b8 292GTKTERM = UXTERM gtkwin gtkcfg gtkdlg gtkfont gtkcols xkeysym
1ddda1ca 293OSXTERM = UXTERM osxwin osxdlg osxctrls
1d009ae7 294
7603011f 295# Non-SSH back ends (putty, puttytel, plink).
39934deb 296NONSSH = telnet raw rlogin ldisc pinger
7603011f 297
298# SSH back end (putty, plink, pscp, psftp).
c5e438ec 299SSH = ssh sshcrc sshdes sshmd5 sshrsa sshrand sshsha sshblowf
300 + sshdh sshcrcda sshpubk sshzlib sshdss x11fwd portfwd
2ccb2fc8 301 + sshaes sshsh256 sshsh512 sshbn wildcard pinger ssharcf
b3d375b2 302 + sshgssc pgssapi
42af6a67 303WINSSH = SSH winnoise winpgntc wingss
304UXSSH = SSH uxnoise uxagentc uxgss
7603011f 305
306# SFTP implementation (pscp, psftp).
307SFTP = sftp int64 logging
308
309# Miscellaneous objects appearing in all the network utilities (not
310# Pageant or PuTTYgen).
4a693cfc 311MISC = timing misc version settings tree234 proxy conf
0edafb21 312WINMISC = MISC winstore winnet winhandl cmdline windefs winmisc winproxy
313 + wintime
aca589d9 314UXMISC = MISC uxstore uxsel uxnet cmdline uxmisc uxproxy time
1ddda1ca 315OSXMISC = MISC uxstore uxsel osxsel uxnet uxmisc uxproxy time
7603011f 316
2dc6356a 317# Character set library, for use in pterm.
d4413bd2 318CHARSET = sbcsdat slookup sbcs utf8 toucs fromucs xenc mimeenc macenc localenc
2dc6356a 319
7440fd44 320# Standard libraries.
7603011f 321LIBS = advapi32.lib user32.lib gdi32.lib comctl32.lib comdlg32.lib
073e9f42 322 + shell32.lib winmm.lib imm32.lib winspool.lib ole32.lib
7603011f 323
f33ba69e 324# Network backend sets. This also brings in the relevant attachment
325# to proxy.c depending on whether we're crypto-avoidant or not.
326BE_ALL = be_all cproxy
327BE_NOSSH = be_nossh nocproxy
f4371346 328BE_SSH = be_ssh cproxy
f33ba69e 329BE_NONE = be_none nocproxy
7374c779 330# More backend sets, with the additional Windows serial-port module.
331W_BE_ALL = be_all_s winser cproxy
332W_BE_NOSSH = be_nos_s winser nocproxy
aef05b78 333# And with the Unix serial-port module.
334U_BE_ALL = be_all_s uxser cproxy
335U_BE_NOSSH = be_nos_s uxser nocproxy
f33ba69e 336
e35fb54b 337# ------------------------------------------------------------
7603011f 338# Definitions of actual programs. The program name, followed by a
339# colon, followed by a list of objects. Also in the list may be the
f7f27309 340# keywords [G] for Windows GUI app, [C] for Console app, [X] for
d7e843be 341# X/GTK Unix app, [U] for command-line Unix app.
7603011f 342
8def70c3 343putty : [G] GUITERM NONSSH WINSSH W_BE_ALL WINMISC winx11 putty.res LIBS
b3d375b2 344puttytel : [G] GUITERM NONSSH W_BE_NOSSH WINMISC puttytel.res nogss LIBS
7374c779 345plink : [C] winplink wincons NONSSH WINSSH W_BE_ALL logging WINMISC
073e9f42 346 + winx11 plink.res winnojmp LIBS
bf1e6912 347pscp : [C] pscp winsftp wincons WINSSH BE_SSH SFTP wildcard WINMISC
073e9f42 348 + pscp.res winnojmp LIBS
dee42491 349psftp : [C] psftp winsftp wincons WINSSH BE_SSH SFTP wildcard WINMISC
073e9f42 350 + psftp.res winnojmp LIBS
7603011f 351
6da41155 352pageant : [G] winpgnt sshrsa sshpubk sshdes sshbn sshmd5 version tree234
fedd99b6 353 + misc sshaes sshsha winpgntc sshdss sshsh256 sshsh512 winutils
4a693cfc 354 + winmisc winhelp conf pageant.res LIBS
7603011f 355
6da41155 356puttygen : [G] winpgen sshrsag sshdssg sshprime sshdes sshbn sshmd5 version
357 + sshrand winnoise sshsha winstore misc winctrls sshrsa sshdss winmisc
fae1a71b 358 + sshpubk sshaes sshsh256 sshsh512 import winutils puttygen.res
4a693cfc 359 + tree234 notiming winhelp winnojmp conf LIBS wintime
f7f27309 360
1ddda1ca 361pterm : [X] GTKTERM uxmisc misc ldisc settings uxpty uxsel BE_NONE uxstore
533c7491 362 + uxsignal CHARSET cmdline uxpterm version time xpmpterm xpmptcfg
b3d375b2 363 + nogss
aef05b78 364putty : [X] GTKTERM uxmisc misc ldisc settings uxsel U_BE_ALL uxstore
533c7491 365 + uxsignal CHARSET uxputty NONSSH UXSSH UXMISC ux_x11 xpmputty
366 + xpmpucfg
aef05b78 367puttytel : [X] GTKTERM uxmisc misc ldisc settings uxsel U_BE_NOSSH
533c7491 368 + uxstore uxsignal CHARSET uxputty NONSSH UXMISC xpmputty xpmpucfg
b3d375b2 369 + nogss
c5e438ec 370
aef05b78 371plink : [U] uxplink uxcons NONSSH UXSSH U_BE_ALL logging UXMISC uxsignal
372 + ux_x11
cd6ca416 373
47a6b94c 374puttygen : [U] cmdgen sshrsag sshdssg sshprime sshdes sshbn sshmd5 version
375 + sshrand uxnoise sshsha misc sshrsa sshdss uxcons uxstore uxmisc
fae1a71b 376 + sshpubk sshaes sshsh256 sshsh512 import puttygen.res time tree234
4a693cfc 377 + uxgen notiming conf
47a6b94c 378
bf1e6912 379pscp : [U] pscp uxsftp uxcons UXSSH BE_SSH SFTP wildcard UXMISC
dee42491 380psftp : [U] psftp uxsftp uxcons UXSSH BE_SSH SFTP wildcard UXMISC
d6cc41e6 381
aef05b78 382PuTTY : [MX] osxmain OSXTERM OSXMISC CHARSET U_BE_ALL NONSSH UXSSH
0980c4f2 383 + ux_x11 uxpty uxsignal testback putty.icns info.plist