uint64_decimal() incorrectly output 0 as "" instead of "0". This only affected
[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
21!makefile mpw mac/Makefile.mpw
cdd310bb 22# Source directories.
23!srcdir charset/
6da41155 24!srcdir windows/
cdd310bb 25!srcdir unix/
26!srcdir mac/
e35fb54b 27
7603011f 28# Help text added to the top of each Makefile, with /D converted
29# into -D as appropriate for the particular Makefile.
30
31!begin help
32#
33# Extra options you can set:
34#
35# - FWHACK=/DFWHACK
36# Enables a hack that tunnels through some firewall proxies.
37#
38# - VER=/DSNAPSHOT=1999-01-25
39# Generates executables whose About box report them as being a
40# development snapshot.
41#
42# - VER=/DRELEASE=0.43
43# Generates executables whose About box report them as being a
44# release version.
45#
46# - COMPAT=/DAUTO_WINSOCK
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#
50# - COMPAT=/DWINSOCK_TWO
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#
55# - COMPAT=/DNO_SECURITY
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#
7603011f 65# - COMPAT=/DNO_MULTIMON
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#
75# - COMPAT=/DMSVC4
76# - RCFL=/DMSVC4
77# Makes a couple of minor changes so that PuTTY compiles using
78# MSVC 4. You will also need /DNO_SECURITY and /DNO_MULTIMON.
79#
80# - RCFL=/DASCIICTLS
81# Uses ASCII rather than Unicode to specify the tab control in
82# the resource file. Probably most useful when compiling with
83# Cygnus/mingw32, whose resource compiler may have less of a
84# problem with it.
85#
4044fc45 86# - XFLAGS=/DTELNET_DEFAULT
87# Causes PuTTY to default to the Telnet protocol (in the absence
88# of Default Settings and so on to the contrary). Normally PuTTY
89# will default to SSH.
90#
7603011f 91# - XFLAGS=/DDEBUG
92# Causes PuTTY to enable internal debugging.
93#
94# - XFLAGS=/DMALLOC_LOG
95# Causes PuTTY to emit a file called putty_mem.log, logging every
96# memory allocation and free, so you can track memory leaks.
97#
98# - XFLAGS=/DMINEFIELD
99# Causes PuTTY to use a custom memory allocator, similar in
100# concept to Electric Fence, in place of regular malloc(). Wastes
101# huge amounts of RAM, but should cause heap-corruption bugs to
102# show up as GPFs at the point of failure rather than appearing
103# later on as second-level damage.
104#
105!end
106
e35fb54b 107# ------------------------------------------------------------
108# Additional text added verbatim to each individual Makefile.
109
110# Hack to force version.o to be rebuilt always.
111!begin vc
112version.obj: *.c *.h *.rc
6da41155 113 cl $(FWHACK) $(VER) $(CFLAGS) /c ..\version.c
e35fb54b 114!end
6da41155 115!specialobj vc version
e35fb54b 116!begin cygwin
6da41155 117version.o: FORCE
e35fb54b 118FORCE:
6da41155 119 $(CC) $(COMPAT) $(FWHACK) $(XFLAGS) $(CFLAGS) $(VER) -c ../version.c
e35fb54b 120!end
6da41155 121!specialobj cygwin version
e35fb54b 122!begin borland
123version.obj: FORCE
124FORCE:
6da41155 125 bcc32 $(FWHACK) $(VER) $(CFLAGS) /c ..\version.c
e35fb54b 126!end
6da41155 127!specialobj borland version
e35fb54b 128!begin lcc
129version.o: FORCE
130FORCE:
6da41155 131 lcc $(FWHACK) $(VER) $(CFLAGS) /c ..\version.c
e35fb54b 132!end
6da41155 133!specialobj lcc version
e35fb54b 134# For Unix, we also need the gross MD5 hack that causes automatic
135# version number selection in release source archives.
136!begin gtk
137version.o: FORCE;
138FORCE:
139 if test -z "$(VER)" && (cd ..; md5sum -c manifest); then \
140 $(CC) $(COMPAT) $(FWHACK) $(XFLAGS) $(CFLAGS) `cat ../version.def` -c ../version.c; \
141 else \
142 $(CC) $(COMPAT) $(FWHACK) $(XFLAGS) $(CFLAGS) $(VER) -c ../version.c; \
143 fi
144!end
6da41155 145!specialobj gtk version
e35fb54b 146
147# `make install' target for Unix.
148!begin gtk
149install:
150 $(INSTALL_PROGRAM) -m 755 plink $(DESTDIR)$(bindir)/plink
151 $(INSTALL_PROGRAM) -m 755 pscp $(DESTDIR)$(bindir)/pscp
152 $(INSTALL_PROGRAM) -m 755 psftp $(DESTDIR)$(bindir)/psftp
153 $(INSTALL_PROGRAM) -m 755 pterm $(DESTDIR)$(bindir)/pterm
154 $(INSTALL_PROGRAM) -m 755 putty $(DESTDIR)$(bindir)/putty
155 $(INSTALL_PROGRAM) -m 755 puttygen $(DESTDIR)$(bindir)/puttygen
156 $(INSTALL_PROGRAM) -m 755 puttytel $(DESTDIR)$(bindir)/puttytel
157 $(INSTALL_DATA) -m 644 ../doc/plink.1 $(DESTDIR)$(man1dir)/plink.1
158 $(INSTALL_DATA) -m 644 ../doc/pscp.1 $(DESTDIR)$(man1dir)/pscp.1
159 $(INSTALL_DATA) -m 644 ../doc/psftp.1 $(DESTDIR)$(man1dir)/psftp.1
160 $(INSTALL_DATA) -m 644 ../doc/pterm.1 $(DESTDIR)$(man1dir)/pterm.1
161 $(INSTALL_DATA) -m 644 ../doc/putty.1 $(DESTDIR)$(man1dir)/putty.1
162 $(INSTALL_DATA) -m 644 ../doc/puttygen.1 $(DESTDIR)$(man1dir)/puttygen.1
163 $(INSTALL_DATA) -m 644 ../doc/puttytel.1 $(DESTDIR)$(man1dir)/puttytel.1
164
165install-strip:
166 $(MAKE) install INSTALL_PROGRAM="$(INSTALL_PROGRAM) -s"
167!end
168
169# ------------------------------------------------------------
7603011f 170# Definitions of object groups. A group name, followed by an =,
171# followed by any number of objects or other already-defined group
172# names. A line beginning `+' is assumed to continue the previous
173# line.
174
f0fccd51 175# Terminal emulator and its (platform-independent) dependencies.
176TERMINAL = terminal wcwidth ldiscucs logging tree234 minibidi
177 + config dialog
178
7603011f 179# GUI front end and terminal emulator (putty, puttytel).
6da41155 180GUITERM = TERMINAL window windlg winctrls sizetip winucs winprint
f0fccd51 181 + winutils wincfg
7603011f 182
f5dd8adb 183# Same thing on Unix.
f0fccd51 184UXTERM = TERMINAL pterm uxcfg gtkdlg gtkcols gtkpanel uxucs uxprint xkeysym
1d009ae7 185
7603011f 186# Non-SSH back ends (putty, puttytel, plink).
187NONSSH = telnet raw rlogin ldisc
188
189# SSH back end (putty, plink, pscp, psftp).
c5e438ec 190SSH = ssh sshcrc sshdes sshmd5 sshrsa sshrand sshsha sshblowf
191 + sshdh sshcrcda sshpubk sshzlib sshdss x11fwd portfwd
831301f6 192 + sshaes sshsh512 sshbn wildcard
6da41155 193WINSSH = SSH winnoise winpgntc
c5e438ec 194UXSSH = SSH uxnoise uxagentc
0c4b7799 195MACSSH = SSH macnoise
7603011f 196
197# SFTP implementation (pscp, psftp).
198SFTP = sftp int64 logging
199
200# Miscellaneous objects appearing in all the network utilities (not
201# Pageant or PuTTYgen).
c5e438ec 202WINMISC = misc version winstore settings tree234 winnet proxy cmdline
0f0a2507 203 + windefs winmisc pproxy
0ff9ea38 204UXMISC = misc version uxstore settings tree234 uxsel uxnet proxy cmdline
0f0a2507 205 + uxmisc uxproxy
27a3458f 206MACMISC = misc version macstore settings tree234 macnet mtcpnet otnet proxy
0f0a2507 207 + macmisc macabout pproxy
7603011f 208
2dc6356a 209# Character set library, for use in pterm.
d4413bd2 210CHARSET = sbcsdat slookup sbcs utf8 toucs fromucs xenc mimeenc macenc localenc
2dc6356a 211
7440fd44 212# Standard libraries.
7603011f 213LIBS = advapi32.lib user32.lib gdi32.lib comctl32.lib comdlg32.lib
214 + shell32.lib winmm.lib imm32.lib winspool.lib
7603011f 215
f33ba69e 216# Network backend sets. This also brings in the relevant attachment
217# to proxy.c depending on whether we're crypto-avoidant or not.
218BE_ALL = be_all cproxy
219BE_NOSSH = be_nossh nocproxy
220BE_SSH = be_none cproxy
221BE_NONE = be_none nocproxy
222
e35fb54b 223# ------------------------------------------------------------
7603011f 224# Definitions of actual programs. The program name, followed by a
225# colon, followed by a list of objects. Also in the list may be the
f7f27309 226# keywords [G] for Windows GUI app, [C] for Console app, [X] for
dddf640d 227# X/GTK Unix app, [U] for command-line Unix app, [M] for Macintosh app.
7603011f 228
f33ba69e 229putty : [G] GUITERM NONSSH WINSSH BE_ALL WINMISC win_res.res LIBS
230puttytel : [G] GUITERM NONSSH BE_NOSSH WINMISC win_res.res LIBS
6da41155 231plink : [C] winplink wincons NONSSH WINSSH BE_ALL logging WINMISC
7440fd44 232 + plink.res LIBS
6da41155 233pscp : [C] scp winsftp wincons WINSSH BE_SSH SFTP wildcard WINMISC
7440fd44 234 + scp.res LIBS
6da41155 235psftp : [C] psftp winsftp wincons WINSSH BE_SSH SFTP WINMISC scp.res LIBS
7603011f 236
6da41155 237pageant : [G] winpgnt sshrsa sshpubk sshdes sshbn sshmd5 version tree234
238 + misc sshaes sshsha winpgntc sshdss sshsh512 winutils winmisc
b492c4d7 239 + pageant.res LIBS
7603011f 240
6da41155 241puttygen : [G] winpgen sshrsag sshdssg sshprime sshdes sshbn sshmd5 version
242 + sshrand winnoise sshsha winstore misc winctrls sshrsa sshdss winmisc
fe8abbf4 243 + sshpubk sshaes sshsh512 import winutils puttygen.res tree234 LIBS
f7f27309 244
f33ba69e 245pterm : [X] UXTERM uxmisc misc ldisc settings pty uxsel BE_NONE uxstore
f5dd8adb 246 + signal CHARSET cmdline ptermm version
f33ba69e 247putty : [X] UXTERM uxmisc misc ldisc settings pty uxsel BE_ALL uxstore
f5dd8adb 248 + signal CHARSET uxputty NONSSH UXSSH UXMISC ux_x11
f33ba69e 249puttytel : [X] UXTERM uxmisc misc ldisc settings pty uxsel BE_NOSSH
250 + uxstore signal CHARSET uxputty NONSSH UXMISC
c5e438ec 251
f33ba69e 252plink : [U] uxplink uxcons NONSSH UXSSH BE_ALL logging UXMISC signal ux_x11
cd6ca416 253
47a6b94c 254puttygen : [U] cmdgen sshrsag sshdssg sshprime sshdes sshbn sshmd5 version
255 + sshrand uxnoise sshsha misc sshrsa sshdss uxcons uxstore uxmisc
256 + sshpubk sshaes sshsh512 import puttygen.res tree234 uxgen
257
f33ba69e 258pscp : [U] scp uxsftp uxcons UXSSH BE_SSH SFTP wildcard UXMISC
259psftp : [U] psftp uxsftp uxcons UXSSH BE_SSH SFTP UXMISC
d6cc41e6 260
f33ba69e 261PuTTY : [M] terminal wcwidth ldiscucs logging BE_ALL mac macdlg macevlog
0c4b7799 262 + macterm macucs mac_res.rsrc testback NONSSH MACSSH MACMISC CHARSET
8a7e67ec 263 + stricmp vsnprint dialog config macctrls
f33ba69e 264PuTTYtel : [M] terminal wcwidth ldiscucs logging BE_NOSSH mac macdlg
265 + macevlog macterm macucs mac_res.rsrc testback NONSSH MACMISC
266 + CHARSET stricmp vsnprint dialog config macctrls
06c24bc0 267PuTTYgen : [M] macpgen sshrsag sshdssg sshprime sshdes sshbn sshmd5 version
268 + sshrand macnoise sshsha macstore misc sshrsa sshdss macmisc sshpubk
217b88d1 269 + sshaes sshsh512 import macpgen.rsrc macpgkey macabout