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.
9 # ------------------------------------------------------------
10 # Top-level configuration.
12 # Overall project name.
14 # Locations and types of output Makefiles.
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
20 !makefile gtk unix/Makefile.gtk
21 !makefile unix unix/Makefile.ux
22 !makefile am Makefile.am
23 !makefile devcppproj windows/DEVCPP
24 !makefile vstudio10 windows/VS2010
25 !makefile vstudio12 windows/VS2012
31 # Help text added to the top of each Makefile, with /D converted
32 # into -D as appropriate for the particular Makefile.
36 # Extra options you can set:
38 # - COMPAT=/DAUTO_WINSOCK (Windows only)
39 # Causes PuTTY to assume that <windows.h> includes its own WinSock
40 # header file, so that it won't try to include <winsock.h>.
42 # - COMPAT=/DWINSOCK_TWO (Windows only)
43 # Causes the PuTTY utilities to include <winsock2.h> instead of
44 # <winsock.h>, except Plink which _needs_ WinSock 2 so it already
47 # - COMPAT=/DNO_SECURITY (Windows only)
48 # Disables Pageant's use of <aclapi.h>, which is not available
49 # with some development environments (such as older versions of
50 # the Cygwin/mingw GNU toolchain). This means that Pageant
51 # won't care about the local user ID of processes accessing it; a
52 # version of Pageant built with this option will therefore refuse
53 # to run under NT-series OSes on security grounds (although it
54 # will run fine on Win95-series OSes where there is no access
57 # - COMPAT=/DNO_MULTIMON (Windows only)
58 # Disables PuTTY's use of <multimon.h>, which is not available
59 # with some development environments. This means that PuTTY's
60 # full-screen mode (configurable to work on Alt-Enter) will
61 # not behave usefully in a multi-monitor environment.
63 # Note that this definition is always enabled in the Cygwin
64 # build, since at the time of writing this <multimon.h> is
65 # known not to be available in Cygwin.
67 # - COMPAT=/DNO_HTMLHELP (Windows only)
68 # Disables PuTTY's use of <htmlhelp.h>, which is not available
69 # with some development environments. The resulting binary
70 # will only look for an old-style WinHelp file (.HLP/.CNT), and
71 # will ignore any .CHM file.
73 # Note that this definition is always enabled in the Cygwin
74 # build, since at the time of writing this <htmlhelp.h> is
75 # known not to be available in Cygwin (although you can use
76 # the htmlhelp.h supplied with HTML Help Workshop).
78 # - RCFL=/DNO_MANIFESTS (Windows only)
79 # Disables inclusion of XML application manifests in the PuTTY
80 # binaries. This may be necessary to build for 64-bit Windows;
81 # the manifests are only included to use the XP GUI style on
82 # Windows XP, and the architecture tags are a lie on 64-bit.
85 # Disables PuTTY's ability to make IPv6 connections, enabling
86 # it to compile under development environments which do not
87 # support IPv6 in their header files.
89 # - COMPAT=/DNO_GSSAPI
90 # Disables PuTTY's ability to use GSSAPI functions for
91 # authentication and key exchange.
93 # - COMPAT=/DSTATIC_GSSAPI
94 # Causes PuTTY to try to link statically against the GSSAPI
95 # library instead of the default of doing it at run time.
97 # - COMPAT=/DMSVC4 (Windows only)
99 # Makes a couple of minor changes so that PuTTY compiles using
100 # MSVC 4. You will also need /DNO_SECURITY and /DNO_MULTIMON.
102 # - COMPAT=/DNO_SECUREZEROMEMORY (Windows only)
103 # Disables PuTTY's use of SecureZeroMemory(), which is missing
104 # from some environments' header files. This is enabled by
105 # default in the Cygwin Makefile.
107 # - XFLAGS=/DTELNET_DEFAULT
108 # Causes PuTTY to default to the Telnet protocol (in the absence
109 # of Default Settings and so on to the contrary). Normally PuTTY
110 # will default to SSH.
113 # Causes PuTTY to enable internal debugging.
115 # - XFLAGS=/DUNPROTECT
116 # Disable tightened ACL on PuTTY process so that e.g. debuggers
119 # - XFLAGS=/DMALLOC_LOG
120 # Causes PuTTY to emit a file called putty_mem.log, logging every
121 # memory allocation and free, so you can track memory leaks.
123 # - XFLAGS=/DMINEFIELD (Windows only)
124 # Causes PuTTY to use a custom memory allocator, similar in
125 # concept to Electric Fence, in place of regular malloc(). Wastes
126 # huge amounts of RAM, but should cause heap-corruption bugs to
127 # show up as GPFs at the point of failure rather than appearing
128 # later on as second-level damage.
131 # Builds a version of PuTTY with some tweaks to make fuzz testing
132 # easier: the SSH random number generator is replaced by one that
133 # always returns the same thing. Note that this makes SSH
134 # completely insecure -- a FUZZING build should never be used to
135 # connect to a real server.
138 # ------------------------------------------------------------
139 # Additional text added verbatim to each individual Makefile.
142 CFLAGS = $(CFLAGS) /DHAS_GSSAPI
145 # `make install' target for Unix.
148 mkdir -p $(DESTDIR)$(bindir) $(DESTDIR)$(man1dir)
149 $(INSTALL_PROGRAM) -m 755 plink $(DESTDIR)$(bindir)/plink
150 $(INSTALL_PROGRAM) -m 755 pscp $(DESTDIR)$(bindir)/pscp
151 $(INSTALL_PROGRAM) -m 755 psftp $(DESTDIR)$(bindir)/psftp
152 $(INSTALL_PROGRAM) -m 755 pterm $(DESTDIR)$(bindir)/pterm
153 if test -n "$(UTMP_GROUP)"; then \
154 chgrp $(UTMP_GROUP) $(DESTDIR)$(bindir)/pterm && \
155 chmod 2755 $(DESTDIR)$(bindir)/pterm; \
156 elif test -n "$(UTMP_USER)"; then \
157 chown $(UTMP_USER) $(DESTDIR)$(bindir)/pterm && \
158 chmod 4755 $(DESTDIR)$(bindir)/pterm; \
160 $(INSTALL_PROGRAM) -m 755 putty $(DESTDIR)$(bindir)/putty
161 $(INSTALL_PROGRAM) -m 755 puttygen $(DESTDIR)$(bindir)/puttygen
162 $(INSTALL_PROGRAM) -m 755 puttytel $(DESTDIR)$(bindir)/puttytel
163 $(INSTALL_DATA) -m 644 ../doc/plink.1 $(DESTDIR)$(man1dir)/plink.1
164 $(INSTALL_DATA) -m 644 ../doc/pscp.1 $(DESTDIR)$(man1dir)/pscp.1
165 $(INSTALL_DATA) -m 644 ../doc/psftp.1 $(DESTDIR)$(man1dir)/psftp.1
166 $(INSTALL_DATA) -m 644 ../doc/pterm.1 $(DESTDIR)$(man1dir)/pterm.1
167 $(INSTALL_DATA) -m 644 ../doc/putty.1 $(DESTDIR)$(man1dir)/putty.1
168 $(INSTALL_DATA) -m 644 ../doc/puttygen.1 $(DESTDIR)$(man1dir)/puttygen.1
169 $(INSTALL_DATA) -m 644 ../doc/puttytel.1 $(DESTDIR)$(man1dir)/puttytel.1
172 $(MAKE) install INSTALL_PROGRAM="$(INSTALL_PROGRAM) -s"
175 # List the man pages for the automake makefile.
177 man1_MANS = doc/plink.1 doc/pscp.1 doc/psftp.1 doc/pterm.1 \
178 doc/putty.1 doc/puttygen.1 doc/puttytel.1
181 # In automake, chgrp/chmod pterm after installation, if configured to.
185 @SETID_CMD@ $(bindir)/pterm
186 chmod @SETID_MODE@ $(bindir)/pterm
190 # In automake makefile, build the OS X app bundle, if configured in
194 noinst_SCRIPTS = unix/PuTTY.app unix/Pterm.app
195 unix/PuTTY.app: unix/putty.bundle puttyapp osxlaunch
196 rm -rf $@ && gtk-mac-bundler $<
197 unix/Pterm.app: unix/pterm.bundle ptermapp osxlaunch
198 rm -rf $@ && gtk-mac-bundler $<
204 # _WIN32_IE is required to expose identifiers that only make sense on
205 # systems with IE5+ installed, such as some arguments to SHGetFolderPath().
206 # WINVER etc perform a similar function for FlashWindowEx().
207 CFLAGS += -D_WIN32_IE=0x0500
208 CFLAGS += -DWINVER=0x0500 -D_WIN32_WINDOWS=0x0410 -D_WIN32_WINNT=0x0500
211 # ------------------------------------------------------------
212 # Definitions of object groups. A group name, followed by an =,
213 # followed by any number of objects or other already-defined group
214 # names. A line beginning `+' is assumed to continue the previous
217 # Terminal emulator and its (platform-independent) dependencies.
218 TERMINAL = terminal wcwidth ldiscucs logging tree234 minibidi
221 # GUI front end and terminal emulator (putty, puttytel).
222 GUITERM = TERMINAL window windlg winctrls sizetip winucs winprint
223 + winutils wincfg sercfg winhelp winjump miscucs
225 # Same thing on Unix.
226 UXTERM = TERMINAL uxcfg sercfg uxucs uxprint timing callback miscucs
227 GTKTERM = UXTERM gtkwin gtkcfg gtkdlg gtkfont gtkcols gtkmisc xkeysym
230 # Non-SSH back ends (putty, puttytel, plink).
231 NONSSH = telnet raw rlogin ldisc pinger
233 # SSH back end (putty, plink, pscp, psftp).
234 SSH = ssh sshcrc sshdes sshmd5 sshrsa sshrand sshsha sshblowf
235 + sshdh sshcrcda sshpubk sshzlib sshdss x11fwd portfwd
236 + sshaes sshccp sshsh256 sshsh512 sshbn wildcard pinger ssharcf
237 + sshgssc pgssapi sshshare sshecc
238 WINSSH = SSH winnoise wincapi winpgntc wingss winshare winnps winnpc
240 UXSSH = SSH uxnoise uxagentc uxgss uxshare
242 # SFTP implementation (pscp, psftp).
243 SFTP = sftp int64 logging
245 # Miscellaneous objects appearing in all the network utilities (not
246 # Pageant or PuTTYgen).
247 MISC = timing callback misc version settings tree234 proxy conf be_misc
248 WINMISC = MISC winstore winnet winhandl cmdline windefs winmisc winproxy
249 + wintime winhsock errsock winsecur
250 UXMISC = MISC uxstore uxsel uxnet uxpeer cmdline uxmisc uxproxy time
252 # import.c and dependencies, for PuTTYgen-like utilities that have to
253 # load foreign key files.
254 IMPORT = import sshbcrypt sshblowf
256 # Character set library, for use in pterm.
257 CHARSET = sbcsdat slookup sbcs utf8 toucs fromucs xenc mimeenc macenc localenc
259 # Standard libraries.
260 LIBS = advapi32.lib user32.lib gdi32.lib comctl32.lib comdlg32.lib
261 + shell32.lib winmm.lib imm32.lib winspool.lib ole32.lib
263 # Network backend sets. This also brings in the relevant attachment
264 # to proxy.c depending on whether we're crypto-avoidant or not.
265 BE_ALL = be_all cproxy
266 BE_NOSSH = be_nossh nocproxy
267 BE_SSH = be_ssh cproxy
268 BE_NONE = be_none nocproxy
269 # More backend sets, with the additional Windows serial-port module.
270 W_BE_ALL = be_all_s winser cproxy
271 W_BE_NOSSH = be_nos_s winser nocproxy
272 # And with the Unix serial-port module.
273 U_BE_ALL = be_all_s uxser cproxy
274 U_BE_NOSSH = be_nos_s uxser nocproxy
276 # ------------------------------------------------------------
277 # Definitions of actual programs. The program name, followed by a
278 # colon, followed by a list of objects. Also in the list may be the
279 # keywords [G] for Windows GUI app, [C] for Console app, [X] for
280 # X/GTK Unix app, [U] for command-line Unix app.
282 putty : [G] GUITERM NONSSH WINSSH W_BE_ALL WINMISC winx11 putty.res LIBS
283 puttytel : [G] GUITERM NONSSH W_BE_NOSSH WINMISC puttytel.res nogss LIBS
284 plink : [C] winplink wincons NONSSH WINSSH W_BE_ALL logging WINMISC
285 + winx11 plink.res winnojmp noterm LIBS
286 pscp : [C] pscp winsftp wincons WINSSH BE_SSH SFTP wildcard WINMISC
287 + pscp.res winnojmp LIBS
288 psftp : [C] psftp winsftp wincons WINSSH BE_SSH SFTP wildcard WINMISC
289 + psftp.res winnojmp LIBS
291 pageant : [G] winpgnt pageant sshrsa sshpubk sshdes sshbn sshmd5 version
292 + tree234 misc sshaes sshsha winsecur winpgntc sshdss sshsh256
293 + sshsh512 winutils sshecc winmisc winhelp conf pageant.res LIBS
295 puttygen : [G] winpgen sshrsag sshdssg sshprime sshdes sshbn sshmd5 version
296 + sshrand winnoise sshsha winstore misc winctrls sshrsa sshdss winmisc
297 + sshpubk sshaes sshsh256 sshsh512 IMPORT winutils puttygen.res
298 + tree234 notiming winhelp winnojmp conf LIBS wintime sshecc
301 pterm : [X] GTKTERM uxmisc misc ldisc settings uxpty uxsel BE_NONE uxstore
302 + uxsignal CHARSET cmdline uxpterm version time xpmpterm xpmptcfg
304 putty : [X] GTKTERM uxmisc misc ldisc settings uxsel U_BE_ALL uxstore
305 + uxsignal CHARSET uxputty NONSSH UXSSH UXMISC ux_x11 xpmputty
307 puttytel : [X] GTKTERM uxmisc misc ldisc settings uxsel U_BE_NOSSH
308 + uxstore uxsignal CHARSET uxputty NONSSH UXMISC xpmputty xpmpucfg
311 plink : [U] uxplink uxcons NONSSH UXSSH U_BE_ALL logging UXMISC uxsignal
314 puttygen : [U] cmdgen sshrsag sshdssg sshprime sshdes sshbn sshmd5 version
315 + sshrand uxnoise sshsha misc sshrsa sshdss uxcons uxstore uxmisc
316 + sshpubk sshaes sshsh256 sshsh512 IMPORT puttygen.res time tree234
317 + uxgen notiming conf sshecc sshecdsag
319 pscp : [U] pscp uxsftp uxcons UXSSH BE_SSH SFTP wildcard UXMISC
320 psftp : [U] psftp uxsftp uxcons UXSSH BE_SSH SFTP wildcard UXMISC
322 pageant : [X] uxpgnt uxagentc pageant sshrsa sshpubk sshdes sshbn sshmd5
323 + version tree234 misc sshaes sshsha sshdss sshsh256 sshsh512 sshecc
324 + conf uxsignal nocproxy nogss be_none x11fwd ux_x11 uxcons gtkask
327 ptermapp : [XT] GTKTERM uxmisc misc ldisc settings uxpty uxsel BE_NONE uxstore
328 + uxsignal CHARSET cmdline uxpterm version time xpmpterm xpmptcfg
330 puttyapp : [XT] GTKTERM uxmisc misc ldisc settings uxsel U_BE_ALL uxstore
331 + uxsignal CHARSET uxputty NONSSH UXSSH UXMISC ux_x11 xpmputty
333 osxlaunch : [UT] osxlaunch
335 fuzzterm : [UT] UXTERM CHARSET misc uxmisc uxucs fuzzterm time settings
337 testbn : [UT] testbn sshbn misc conf tree234 uxmisc
338 testbn : [C] testbn sshbn misc conf tree234 winmisc LIBS
340 # ----------------------------------------------------------------------
341 # On Windows, provide a means of removing local test binaries that we
342 # aren't going to actually ship. (I prefer this to not building them
343 # in the first place, so that we find out about build breakage early.)
346 -del $(BUILDDIR)testbn.exe