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.mgw
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 use of <aclapi.h>, which is not available with some
49 # development environments (such as very old versions of the
50 # mingw/Cygwin GNU toolchain). This has the following effects:
51 # - Pageant won't care about the local user ID of processes
52 # accessing it; a version of Pageant built with this option
53 # will therefore refuse to run under NT-series OSes on
54 # security grounds (although it will run fine on Win95-series
55 # OSes where there is no access control anyway).
56 # - SSH connection sharing is disabled.
57 # - There is no restriction of the process ACLs (on all versions
58 # of Windows, without warning), as if UNPROTECT below were set.
60 # - COMPAT=/DNO_MULTIMON (Windows only)
61 # Disables PuTTY's use of <multimon.h>, which is not available
62 # with some development environments. This means that PuTTY's
63 # full-screen mode (configurable to work on Alt-Enter) will
64 # not behave usefully in a multi-monitor environment.
66 # - COMPAT=/DNO_HTMLHELP (Windows only)
67 # Disables PuTTY's use of <htmlhelp.h>, which is not available
68 # with some development environments. The resulting binary
69 # will only look for an old-style WinHelp file (.HLP/.CNT), and
70 # will ignore any .CHM file.
72 # If you don't have this header, you may be able to use the copy
73 # supplied with HTML Help Workshop.
75 # - RCFL=/DNO_MANIFESTS (Windows only)
76 # Disables inclusion of XML application manifests in the PuTTY
77 # binaries. This may be necessary to build for 64-bit Windows;
78 # the manifests are only included to use the XP GUI style on
79 # Windows XP, and the architecture tags are a lie on 64-bit.
82 # Disables PuTTY's ability to make IPv6 connections, enabling
83 # it to compile under development environments which do not
84 # support IPv6 in their header files.
86 # - COMPAT=/DNO_GSSAPI
87 # Disables PuTTY's ability to use GSSAPI functions for
88 # authentication and key exchange.
90 # - COMPAT=/DSTATIC_GSSAPI
91 # Causes PuTTY to try to link statically against the GSSAPI
92 # library instead of the default of doing it at run time.
94 # - COMPAT=/DMSVC4 (Windows only)
96 # Makes a couple of minor changes so that PuTTY compiles using
97 # MSVC 4. You will also need /DNO_SECURITY and /DNO_MULTIMON.
99 # - COMPAT=/DNO_SECUREZEROMEMORY (Windows only)
100 # Disables PuTTY's use of SecureZeroMemory(), which is missing
101 # from some environments' header files.
103 # - XFLAGS=/DTELNET_DEFAULT
104 # Causes PuTTY to default to the Telnet protocol (in the absence
105 # of Default Settings and so on to the contrary). Normally PuTTY
106 # will default to SSH.
109 # Causes PuTTY to enable internal debugging.
111 # - XFLAGS=/DUNPROTECT
112 # Disable tightened ACL on PuTTY process so that e.g. debuggers
115 # - XFLAGS=/DMALLOC_LOG
116 # Causes PuTTY to emit a file called putty_mem.log, logging every
117 # memory allocation and free, so you can track memory leaks.
119 # - XFLAGS=/DMINEFIELD (Windows only)
120 # Causes PuTTY to use a custom memory allocator, similar in
121 # concept to Electric Fence, in place of regular malloc(). Wastes
122 # huge amounts of RAM, but should cause heap-corruption bugs to
123 # show up as GPFs at the point of failure rather than appearing
124 # later on as second-level damage.
127 # Builds a version of PuTTY with some tweaks to make fuzz testing
128 # easier: the SSH random number generator is replaced by one that
129 # always returns the same thing. Note that this makes SSH
130 # completely insecure -- a FUZZING build should never be used to
131 # connect to a real server.
134 # ------------------------------------------------------------
135 # Additional text added verbatim to each individual Makefile.
138 CFLAGS = $(CFLAGS) /DHAS_GSSAPI
141 # `make install' target for Unix.
144 mkdir -p $(DESTDIR)$(bindir) $(DESTDIR)$(man1dir)
145 $(INSTALL_PROGRAM) -m 755 plink $(DESTDIR)$(bindir)/plink
146 $(INSTALL_PROGRAM) -m 755 pscp $(DESTDIR)$(bindir)/pscp
147 $(INSTALL_PROGRAM) -m 755 psftp $(DESTDIR)$(bindir)/psftp
148 $(INSTALL_PROGRAM) -m 755 pterm $(DESTDIR)$(bindir)/pterm
149 if test -n "$(UTMP_GROUP)"; then \
150 chgrp $(UTMP_GROUP) $(DESTDIR)$(bindir)/pterm && \
151 chmod 2755 $(DESTDIR)$(bindir)/pterm; \
152 elif test -n "$(UTMP_USER)"; then \
153 chown $(UTMP_USER) $(DESTDIR)$(bindir)/pterm && \
154 chmod 4755 $(DESTDIR)$(bindir)/pterm; \
156 $(INSTALL_PROGRAM) -m 755 putty $(DESTDIR)$(bindir)/putty
157 $(INSTALL_PROGRAM) -m 755 puttygen $(DESTDIR)$(bindir)/puttygen
158 $(INSTALL_PROGRAM) -m 755 puttytel $(DESTDIR)$(bindir)/puttytel
159 $(INSTALL_DATA) -m 644 ../doc/plink.1 $(DESTDIR)$(man1dir)/plink.1
160 $(INSTALL_DATA) -m 644 ../doc/pscp.1 $(DESTDIR)$(man1dir)/pscp.1
161 $(INSTALL_DATA) -m 644 ../doc/psftp.1 $(DESTDIR)$(man1dir)/psftp.1
162 $(INSTALL_DATA) -m 644 ../doc/pterm.1 $(DESTDIR)$(man1dir)/pterm.1
163 $(INSTALL_DATA) -m 644 ../doc/putty.1 $(DESTDIR)$(man1dir)/putty.1
164 $(INSTALL_DATA) -m 644 ../doc/puttygen.1 $(DESTDIR)$(man1dir)/puttygen.1
165 $(INSTALL_DATA) -m 644 ../doc/puttytel.1 $(DESTDIR)$(man1dir)/puttytel.1
168 $(MAKE) install INSTALL_PROGRAM="$(INSTALL_PROGRAM) -s"
171 # List the man pages for the automake makefile.
173 man1_MANS = doc/plink.1 doc/pscp.1 doc/psftp.1 doc/pterm.1 \
174 doc/putty.1 doc/puttygen.1 doc/puttytel.1
177 # In automake, chgrp/chmod pterm after installation, if configured to.
181 @SETID_CMD@ $(bindir)/pterm
182 chmod @SETID_MODE@ $(bindir)/pterm
186 # In automake makefile, build the OS X app bundle, if configured in
190 noinst_SCRIPTS = unix/PuTTY.app unix/Pterm.app
191 unix/PuTTY.app: unix/putty.bundle puttyapp osxlaunch
192 rm -rf $@ && gtk-mac-bundler $<
193 unix/Pterm.app: unix/pterm.bundle ptermapp osxlaunch
194 rm -rf $@ && gtk-mac-bundler $<
200 # _WIN32_IE is required to expose identifiers that only make sense on
201 # systems with IE5+ installed, such as some arguments to SHGetFolderPath().
202 # WINVER etc perform a similar function for FlashWindowEx().
203 CFLAGS += -D_WIN32_IE=0x0500
204 CFLAGS += -DWINVER=0x0500 -D_WIN32_WINDOWS=0x0410 -D_WIN32_WINNT=0x0500
207 # ------------------------------------------------------------
208 # Definitions of object groups. A group name, followed by an =,
209 # followed by any number of objects or other already-defined group
210 # names. A line beginning `+' is assumed to continue the previous
213 # Terminal emulator and its (platform-independent) dependencies.
214 TERMINAL = terminal wcwidth ldiscucs logging tree234 minibidi
217 # GUI front end and terminal emulator (putty, puttytel).
218 GUITERM = TERMINAL window windlg winctrls sizetip winucs winprint
219 + winutils wincfg sercfg winhelp winjump miscucs
221 # Same thing on Unix.
222 UXTERM = TERMINAL uxcfg sercfg uxucs uxprint timing callback miscucs
223 GTKTERM = UXTERM gtkwin gtkcfg gtkdlg gtkfont gtkcols gtkmisc xkeysym
226 # Non-SSH back ends (putty, puttytel, plink).
227 NONSSH = telnet raw rlogin ldisc pinger
229 # SSH back end (putty, plink, pscp, psftp).
230 SSH = ssh sshcrc sshdes sshmd5 sshrsa sshrand sshsha sshblowf
231 + sshdh sshcrcda sshpubk sshzlib sshdss x11fwd portfwd
232 + sshaes sshccp sshsh256 sshsh512 sshbn wildcard pinger ssharcf
233 + sshgssc pgssapi sshshare sshecc
234 WINSSH = SSH winnoise wincapi winpgntc wingss winshare winnps winnpc
236 UXSSH = SSH uxnoise uxagentc uxgss uxshare
238 # SFTP implementation (pscp, psftp).
239 SFTP = sftp int64 logging
241 # Miscellaneous objects appearing in all the network utilities (not
242 # Pageant or PuTTYgen).
243 MISC = timing callback misc version settings tree234 proxy conf be_misc
244 WINMISC = MISC winstore winnet winhandl cmdline windefs winmisc winproxy
245 + wintime winhsock errsock winsecur
246 UXMISC = MISC uxstore uxsel uxnet uxpeer cmdline uxmisc uxproxy time
248 # import.c and dependencies, for PuTTYgen-like utilities that have to
249 # load foreign key files.
250 IMPORT = import sshbcrypt sshblowf
252 # Character set library, for use in pterm.
253 CHARSET = sbcsdat slookup sbcs utf8 toucs fromucs xenc mimeenc macenc localenc
255 # Standard libraries.
256 LIBS = advapi32.lib user32.lib gdi32.lib comctl32.lib comdlg32.lib
257 + shell32.lib winmm.lib imm32.lib winspool.lib ole32.lib
259 # Network backend sets. This also brings in the relevant attachment
260 # to proxy.c depending on whether we're crypto-avoidant or not.
261 BE_ALL = be_all cproxy
262 BE_NOSSH = be_nossh nocproxy
263 BE_SSH = be_ssh cproxy
264 BE_NONE = be_none nocproxy
265 # More backend sets, with the additional Windows serial-port module.
266 W_BE_ALL = be_all_s winser cproxy
267 W_BE_NOSSH = be_nos_s winser nocproxy
268 # And with the Unix serial-port module.
269 U_BE_ALL = be_all_s uxser cproxy
270 U_BE_NOSSH = be_nos_s uxser nocproxy
272 # ------------------------------------------------------------
273 # Definitions of actual programs. The program name, followed by a
274 # colon, followed by a list of objects. Also in the list may be the
275 # keywords [G] for Windows GUI app, [C] for Console app, [X] for
276 # X/GTK Unix app, [U] for command-line Unix app.
278 putty : [G] GUITERM NONSSH WINSSH W_BE_ALL WINMISC winx11 putty.res LIBS
279 puttytel : [G] GUITERM NONSSH W_BE_NOSSH WINMISC puttytel.res nogss LIBS
280 plink : [C] winplink wincons NONSSH WINSSH W_BE_ALL logging WINMISC
281 + winx11 plink.res winnojmp noterm LIBS
282 pscp : [C] pscp winsftp wincons WINSSH BE_SSH SFTP wildcard WINMISC
283 + pscp.res winnojmp LIBS
284 psftp : [C] psftp winsftp wincons WINSSH BE_SSH SFTP wildcard WINMISC
285 + psftp.res winnojmp LIBS
287 pageant : [G] winpgnt pageant sshrsa sshpubk sshdes sshbn sshmd5 version
288 + tree234 misc sshaes sshsha winsecur winpgntc sshdss sshsh256
289 + sshsh512 winutils sshecc winmisc winhelp conf pageant.res LIBS
291 puttygen : [G] winpgen sshrsag sshdssg sshprime sshdes sshbn sshmd5 version
292 + sshrand winnoise sshsha winstore misc winctrls sshrsa sshdss winmisc
293 + sshpubk sshaes sshsh256 sshsh512 IMPORT winutils puttygen.res
294 + tree234 notiming winhelp winnojmp conf LIBS wintime sshecc
297 pterm : [X] GTKTERM uxmisc misc ldisc settings uxpty uxsel BE_NONE uxstore
298 + uxsignal CHARSET cmdline uxpterm version time xpmpterm xpmptcfg
300 putty : [X] GTKTERM uxmisc misc ldisc settings uxsel U_BE_ALL uxstore
301 + uxsignal CHARSET uxputty NONSSH UXSSH UXMISC ux_x11 xpmputty
303 puttytel : [X] GTKTERM uxmisc misc ldisc settings uxsel U_BE_NOSSH
304 + uxstore uxsignal CHARSET uxputty NONSSH UXMISC xpmputty xpmpucfg
307 plink : [U] uxplink uxcons NONSSH UXSSH U_BE_ALL logging UXMISC uxsignal
310 PUTTYGEN_UNIX = sshrsag sshdssg sshprime sshdes sshbn sshmd5 version
311 + sshrand uxnoise sshsha misc sshrsa sshdss uxcons uxstore uxmisc
312 + sshpubk sshaes sshsh256 sshsh512 IMPORT puttygen.res time tree234
313 + uxgen notiming conf sshecc sshecdsag
314 puttygen : [U] cmdgen PUTTYGEN_UNIX
315 cgtest : [UT] cgtest PUTTYGEN_UNIX
317 pscp : [U] pscp uxsftp uxcons UXSSH BE_SSH SFTP wildcard UXMISC
318 psftp : [U] psftp uxsftp uxcons UXSSH BE_SSH SFTP wildcard UXMISC
320 pageant : [X] uxpgnt uxagentc pageant sshrsa sshpubk sshdes sshbn sshmd5
321 + version tree234 misc sshaes sshsha sshdss sshsh256 sshsh512 sshecc
322 + conf uxsignal nocproxy nogss be_none x11fwd ux_x11 uxcons gtkask
325 ptermapp : [XT] GTKTERM uxmisc misc ldisc settings uxpty uxsel BE_NONE uxstore
326 + uxsignal CHARSET cmdline uxpterm version time xpmpterm xpmptcfg
328 puttyapp : [XT] GTKTERM uxmisc misc ldisc settings uxsel U_BE_ALL uxstore
329 + uxsignal CHARSET uxputty NONSSH UXSSH UXMISC ux_x11 xpmputty
331 osxlaunch : [UT] osxlaunch
333 fuzzterm : [UT] UXTERM CHARSET misc uxmisc uxucs fuzzterm time settings
335 testbn : [UT] testbn sshbn misc conf tree234 uxmisc
336 testbn : [C] testbn sshbn misc conf tree234 winmisc LIBS
338 # ----------------------------------------------------------------------
339 # On Windows, provide a means of removing local test binaries that we
340 # aren't going to actually ship. (I prefer this to not building them
341 # in the first place, so that we find out about build breakage early.)
344 -del $(BUILDDIR)testbn.exe