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