]> asedeno.scripts.mit.edu Git - PuTTY.git/blob - Recipe
Add -c/-s to Unix 'pageant --help'.
[PuTTY.git] / Recipe
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
9 # ------------------------------------------------------------
10 # Top-level configuration.
11
12 # Overall project name.
13 !name putty
14 # Locations and types of output Makefiles.
15 !makefile clangcl windows/Makefile.clangcl
16 !makefile vc windows/Makefile.vc
17 !makefile vcproj windows/MSVC
18 !makefile cygwin windows/Makefile.mgw
19 !makefile borland windows/Makefile.bor
20 !makefile lcc windows/Makefile.lcc
21 !makefile gtk unix/Makefile.gtk
22 !makefile unix unix/Makefile.ux
23 !makefile am Makefile.am
24 !makefile devcppproj windows/DEVCPP
25 !makefile vstudio10 windows/VS2010
26 !makefile vstudio12 windows/VS2012
27 # Source directories.
28 !srcdir charset/
29 !srcdir windows/
30 !srcdir unix/
31
32 # Help text added to the top of each Makefile, with /D converted
33 # into -D as appropriate for the particular Makefile.
34
35 !begin help
36 #
37 # Extra options you can set:
38 #
39 #  - COMPAT=/DAUTO_WINSOCK (Windows only)
40 #      Causes PuTTY to assume that <windows.h> includes its own WinSock
41 #      header file, so that it won't try to include <winsock.h>.
42 #
43 #  - COMPAT=/DWINSOCK_TWO (Windows only)
44 #      Causes the PuTTY utilities to include <winsock2.h> instead of
45 #      <winsock.h>, except Plink which _needs_ WinSock 2 so it already
46 #      does this.
47 #
48 #  - COMPAT=/DNO_SECURITY (Windows only)
49 #      Disables use of <aclapi.h>, which is not available with some
50 #      development environments (such as very old versions of the
51 #      mingw/Cygwin GNU toolchain). This has the following effects:
52 #       - Pageant won't care about the local user ID of processes
53 #         accessing it; a version of Pageant built with this option
54 #         will therefore refuse to run under NT-series OSes on
55 #         security grounds (although it will run fine on Win95-series
56 #         OSes where there is no access control anyway).
57 #       - SSH connection sharing is disabled.
58 #       - There is no support for restriction of the process ACLs.
59 #
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.
65 #
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.
71 #
72 #      If you don't have this header, you may be able to use the copy
73 #      supplied with HTML Help Workshop.
74 #
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.
80 #
81 #  - COMPAT=/DNO_IPV6
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.
85 #
86 #  - COMPAT=/DNO_GSSAPI
87 #      Disables PuTTY's ability to use GSSAPI functions for
88 #      authentication and key exchange.
89 #
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.
93 #
94 #  - COMPAT=/DMSVC4 (Windows only)
95 #  - RCFL=/DMSVC4
96 #      Makes a couple of minor changes so that PuTTY compiles using
97 #      MSVC 4. You will also need /DNO_SECURITY and /DNO_MULTIMON.
98 #
99 #  - COMPAT=/DNO_SECUREZEROMEMORY (Windows only)
100 #      Disables PuTTY's use of SecureZeroMemory(), which is missing
101 #      from some environments' header files.
102 #
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.
107 #
108 #  - XFLAGS=/DDEBUG
109 #      Causes PuTTY to enable internal debugging.
110 #
111 #  - XFLAGS=/DMALLOC_LOG
112 #      Causes PuTTY to emit a file called putty_mem.log, logging every
113 #      memory allocation and free, so you can track memory leaks.
114 #
115 #  - XFLAGS=/DMINEFIELD (Windows only)
116 #      Causes PuTTY to use a custom memory allocator, similar in
117 #      concept to Electric Fence, in place of regular malloc(). Wastes
118 #      huge amounts of RAM, but should cause heap-corruption bugs to
119 #      show up as GPFs at the point of failure rather than appearing
120 #      later on as second-level damage.
121 #
122 #  - XFLAGS=/DFUZZING
123 #      Builds a version of PuTTY with some tweaks to make fuzz testing
124 #      easier: the SSH random number generator is replaced by one that
125 #      always returns the same thing.  Note that this makes SSH
126 #      completely insecure -- a FUZZING build should never be used to
127 #      connect to a real server.
128 !end
129
130 # ------------------------------------------------------------
131 # Additional text added verbatim to each individual Makefile.
132
133 !cflags am version
134 !begin am
135 if AUTO_GIT_COMMIT
136 BUILT_SOURCES = empty.h
137 CLEANFILES = empty.h
138 libversion_a_CFLAGS += -DSOURCE_COMMIT=\"`git --git-dir=$(srcdir)/.git rev-parse HEAD 2>/dev/null`\"
139 empty.h: $(allsources)
140         echo '/* Empty file touched by automake makefile to force rebuild of version.o */' >$@
141 endif
142 !end
143 !begin >empty.h
144 /* Empty file touched by automake makefile to force rebuild of version.o */
145 !end
146
147 !begin vc vars
148 CFLAGS = $(CFLAGS) /DHAS_GSSAPI
149 !end
150
151 !begin clangcl vars
152 CFLAGS += /DHAS_GSSAPI
153 !end
154
155 # `make install' target for Unix.
156 !begin gtk
157 install:
158         mkdir -p $(DESTDIR)$(bindir) $(DESTDIR)$(man1dir)
159         $(INSTALL_PROGRAM) -m 755 plink $(DESTDIR)$(bindir)/plink
160         $(INSTALL_PROGRAM) -m 755 pscp $(DESTDIR)$(bindir)/pscp
161         $(INSTALL_PROGRAM) -m 755 psftp $(DESTDIR)$(bindir)/psftp
162         $(INSTALL_PROGRAM) -m 755 pterm $(DESTDIR)$(bindir)/pterm
163         if test -n "$(UTMP_GROUP)"; then \
164           chgrp $(UTMP_GROUP) $(DESTDIR)$(bindir)/pterm && \
165             chmod 2755 $(DESTDIR)$(bindir)/pterm; \
166         elif test -n "$(UTMP_USER)"; then \
167           chown $(UTMP_USER) $(DESTDIR)$(bindir)/pterm && \
168             chmod 4755 $(DESTDIR)$(bindir)/pterm; \
169         fi
170         $(INSTALL_PROGRAM) -m 755 putty $(DESTDIR)$(bindir)/putty
171         $(INSTALL_PROGRAM) -m 755 puttygen $(DESTDIR)$(bindir)/puttygen
172         $(INSTALL_PROGRAM) -m 755 puttytel $(DESTDIR)$(bindir)/puttytel
173         $(INSTALL_DATA) -m 644 ../doc/plink.1 $(DESTDIR)$(man1dir)/plink.1
174         $(INSTALL_DATA) -m 644 ../doc/pscp.1 $(DESTDIR)$(man1dir)/pscp.1
175         $(INSTALL_DATA) -m 644 ../doc/psftp.1 $(DESTDIR)$(man1dir)/psftp.1
176         $(INSTALL_DATA) -m 644 ../doc/pterm.1 $(DESTDIR)$(man1dir)/pterm.1
177         $(INSTALL_DATA) -m 644 ../doc/putty.1 $(DESTDIR)$(man1dir)/putty.1
178         $(INSTALL_DATA) -m 644 ../doc/puttygen.1 $(DESTDIR)$(man1dir)/puttygen.1
179         $(INSTALL_DATA) -m 644 ../doc/puttytel.1 $(DESTDIR)$(man1dir)/puttytel.1
180
181 install-strip:
182         $(MAKE) install INSTALL_PROGRAM="$(INSTALL_PROGRAM) -s"
183 !end
184
185 # List the man pages for the automake makefile.
186 !begin am
187 man1_MANS = doc/plink.1 doc/pscp.1 doc/psftp.1 doc/pterm.1 \
188             doc/putty.1 doc/puttygen.1 doc/puttytel.1
189 !end
190
191 # In automake, chgrp/chmod pterm after installation, if configured to.
192 !begin am
193 if HAVE_SETID_CMD
194 install-exec-local:
195         @SETID_CMD@ $(bindir)/pterm
196         chmod @SETID_MODE@ $(bindir)/pterm
197 endif
198 !end
199
200 # In automake makefile, build the OS X app bundle, if configured in
201 # Quartz mode.
202 !begin am
203 if HAVE_QUARTZ
204 noinst_SCRIPTS = unix/PuTTY.app unix/Pterm.app
205 unix/PuTTY.app: unix/putty.bundle puttyapp osxlaunch
206         rm -rf $@ && gtk-mac-bundler $<
207 unix/Pterm.app: unix/pterm.bundle ptermapp osxlaunch
208         rm -rf $@ && gtk-mac-bundler $<
209 endif
210 !end
211
212 # Random symbols.
213 !begin cygwin vars
214 # _WIN32_IE is required to expose identifiers that only make sense on
215 # systems with IE5+ installed, such as some arguments to SHGetFolderPath().
216 # WINVER etc perform a similar function for FlashWindowEx().
217 CFLAGS += -D_WIN32_IE=0x0500
218 CFLAGS += -DWINVER=0x0500 -D_WIN32_WINDOWS=0x0410 -D_WIN32_WINNT=0x0500
219 !end
220
221 # ------------------------------------------------------------
222 # Definitions of object groups. A group name, followed by an =,
223 # followed by any number of objects or other already-defined group
224 # names. A line beginning `+' is assumed to continue the previous
225 # line.
226
227 # Terminal emulator and its (platform-independent) dependencies.
228 TERMINAL = terminal wcwidth ldiscucs logging tree234 minibidi
229          + config dialog conf
230
231 # GUI front end and terminal emulator (putty, puttytel).
232 GUITERM  = TERMINAL window windlg winctrls sizetip winucs winprint
233          + winutils wincfg sercfg winhelp winjump miscucs
234
235 # Same thing on Unix.
236 UXTERM   = TERMINAL uxcfg sercfg uxucs uxprint timing callback miscucs
237 GTKTERM  = UXTERM gtkwin gtkcfg gtkdlg gtkfont gtkcols gtkmisc xkeysym
238          + x11misc gtkcomm
239
240 # Non-SSH back ends (putty, puttytel, plink).
241 NONSSH   = telnet raw rlogin ldisc pinger
242
243 # SSH back end (putty, plink, pscp, psftp).
244 SSH      = ssh sshcrc sshdes sshmd5 sshrsa sshrand sshsha sshblowf
245          + sshdh sshcrcda sshpubk sshzlib sshdss x11fwd portfwd
246          + sshaes sshccp sshsh256 sshsh512 sshbn wildcard pinger ssharcf
247          + sshgssc pgssapi sshshare sshecc aqsync
248 WINSSH   = SSH winnoise wincapi winpgntc wingss winshare winnps winnpc
249          + winhsock errsock
250 UXSSH    = SSH uxnoise uxagentc uxgss uxshare
251
252 # SFTP implementation (pscp, psftp).
253 SFTP     = sftp int64 logging
254
255 # Miscellaneous objects appearing in all the network utilities (not
256 # Pageant or PuTTYgen).
257 MISC     = timing callback misc version settings tree234 proxy conf be_misc
258 WINMISC  = MISC winstore winnet winhandl cmdline windefs winmisc winproxy
259          + wintime winhsock errsock winsecur
260 UXMISC   = MISC uxstore uxsel uxnet uxpeer cmdline uxmisc uxproxy time
261
262 # import.c and dependencies, for PuTTYgen-like utilities that have to
263 # load foreign key files.
264 IMPORT   = import sshbcrypt sshblowf
265
266 # Character set library, for use in pterm.
267 CHARSET  = sbcsdat slookup sbcs utf8 toucs fromucs xenc mimeenc macenc localenc
268
269 # Standard libraries.
270 LIBS     = advapi32.lib user32.lib gdi32.lib comctl32.lib comdlg32.lib
271          + shell32.lib winmm.lib imm32.lib winspool.lib ole32.lib
272
273 # Network backend sets. This also brings in the relevant attachment
274 # to proxy.c depending on whether we're crypto-avoidant or not.
275 BE_ALL   = be_all cproxy
276 BE_NOSSH = be_nossh nocproxy
277 BE_SSH   = be_ssh cproxy
278 BE_NONE  = be_none nocproxy
279 # More backend sets, with the additional Windows serial-port module.
280 W_BE_ALL = be_all_s winser cproxy
281 W_BE_NOSSH = be_nos_s winser nocproxy
282 # And with the Unix serial-port module.
283 U_BE_ALL = be_all_s uxser cproxy
284 U_BE_NOSSH = be_nos_s uxser nocproxy
285
286 # ------------------------------------------------------------
287 # Definitions of actual programs. The program name, followed by a
288 # colon, followed by a list of objects. Also in the list may be the
289 # keywords [G] for Windows GUI app, [C] for Console app, [X] for
290 # X/GTK Unix app, [U] for command-line Unix app.
291
292 putty    : [G] GUITERM NONSSH WINSSH W_BE_ALL WINMISC winx11 putty.res LIBS
293 puttytel : [G] GUITERM NONSSH W_BE_NOSSH WINMISC puttytel.res nogss LIBS
294 plink    : [C] winplink wincons NONSSH WINSSH W_BE_ALL logging WINMISC
295          + winx11 plink.res winnojmp noterm LIBS
296 pscp     : [C] pscp winsftp wincons WINSSH BE_SSH SFTP wildcard WINMISC
297          + pscp.res winnojmp LIBS
298 psftp    : [C] psftp winsftp wincons WINSSH BE_SSH SFTP wildcard WINMISC
299          + psftp.res winnojmp LIBS
300
301 pageant  : [G] winpgnt pageant sshrsa sshpubk sshdes sshbn sshmd5 version
302          + tree234 misc sshaes sshsha winsecur winpgntc aqsync sshdss sshsh256
303          + sshsh512 winutils sshecc winmisc winhelp conf pageant.res LIBS
304
305 puttygen : [G] winpgen sshrsag sshdssg sshprime sshdes sshbn sshmd5 version
306          + sshrand winnoise sshsha winstore misc winctrls sshrsa sshdss winmisc
307          + sshpubk sshaes sshsh256 sshsh512 IMPORT winutils puttygen.res
308          + tree234 notiming winhelp winnojmp conf LIBS wintime sshecc
309          + sshecdsag winsecur
310
311 pterm    : [X] GTKTERM uxmisc misc ldisc settings uxpty uxsel BE_NONE uxstore
312          + uxsignal CHARSET cmdline uxpterm version time xpmpterm xpmptcfg
313          + nogss gtkmain
314 putty    : [X] GTKTERM uxmisc misc ldisc settings uxsel U_BE_ALL uxstore
315          + uxsignal CHARSET uxputty NONSSH UXSSH UXMISC ux_x11 xpmputty
316          + xpmpucfg gtkmain
317 puttytel : [X] GTKTERM uxmisc misc ldisc settings uxsel U_BE_NOSSH
318          + uxstore uxsignal CHARSET uxputty NONSSH UXMISC xpmputty xpmpucfg
319          + nogss gtkmain
320
321 plink    : [U] uxplink uxcons NONSSH UXSSH U_BE_ALL logging UXMISC uxsignal
322          + ux_x11 noterm
323
324 PUTTYGEN_UNIX = sshrsag sshdssg sshprime sshdes sshbn sshmd5 version
325          + sshrand uxnoise sshsha misc sshrsa sshdss uxcons uxstore uxmisc
326          + sshpubk sshaes sshsh256 sshsh512 IMPORT puttygen.res time tree234
327          + uxgen notiming conf sshecc sshecdsag
328 puttygen : [U] cmdgen PUTTYGEN_UNIX
329 cgtest   : [UT] cgtest PUTTYGEN_UNIX
330
331 pscp     : [U] pscp uxsftp uxcons UXSSH BE_SSH SFTP wildcard UXMISC
332 psftp    : [U] psftp uxsftp uxcons UXSSH BE_SSH SFTP wildcard UXMISC
333
334 pageant  : [X] uxpgnt uxagentc aqsync pageant sshrsa sshpubk sshdes sshbn
335          + sshmd5 version tree234 misc sshaes sshsha sshdss sshsh256 sshsh512
336          + sshecc conf uxsignal nocproxy nogss be_none x11fwd ux_x11 uxcons
337          + gtkask gtkmisc UXMISC
338
339 ptermapp : [XT] GTKTERM uxmisc misc ldisc settings uxpty uxsel BE_NONE uxstore
340          + uxsignal CHARSET cmdline uxpterm version time xpmpterm xpmptcfg
341          + nogss gtkapp
342 puttyapp : [XT] GTKTERM uxmisc misc ldisc settings uxsel U_BE_ALL uxstore
343          + uxsignal CHARSET uxputty NONSSH UXSSH UXMISC ux_x11 xpmputty
344          + xpmpucfg gtkapp
345 osxlaunch : [UT] osxlaunch
346
347 fuzzterm : [UT] UXTERM CHARSET misc version uxmisc uxucs fuzzterm time settings
348          + uxstore be_none
349 testbn   : [UT] testbn sshbn misc version conf tree234 uxmisc
350 testbn   : [C] testbn sshbn misc version conf tree234 winmisc LIBS
351
352 # ----------------------------------------------------------------------
353 # On Windows, provide a means of removing local test binaries that we
354 # aren't going to actually ship. (I prefer this to not building them
355 # in the first place, so that we find out about build breakage early.)
356 !begin vc
357 cleantestprogs:
358         -del $(BUILDDIR)testbn.exe
359 !end
360 !begin clangcl
361 cleantestprogs:
362         -rm -f $(BUILDDIR)testbn.exe
363 !end