Add a NO_HTMLHELP option, and enable it by default in the Cygwin Makefile,
[u/mdw/putty] / 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 ac unix/Makefile.in
22 !makefile mpw mac/Makefile.mpw
23 !makefile osx macosx/Makefile
24 !makefile devcppproj windows/DEVCPP
25 # Source directories.
26 !srcdir charset/
27 !srcdir windows/
28 !srcdir unix/
29 !srcdir mac/
30 !srcdir macosx/
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 # - VER="/DSNAPSHOT=1999-01-25 /DSVN_REV=1234"
40 # Generates executables whose About box report them as being a
41 # development snapshot. SVN_REV is a Subversion revision number.
42 #
43 # - VER=/DRELEASE=0.43
44 # Generates executables whose About box report them as being a
45 # release version.
46 #
47 # - COMPAT=/DAUTO_WINSOCK (Windows only)
48 # Causes PuTTY to assume that <windows.h> includes its own WinSock
49 # header file, so that it won't try to include <winsock.h>.
50 #
51 # - COMPAT=/DWINSOCK_TWO (Windows only)
52 # Causes the PuTTY utilities to include <winsock2.h> instead of
53 # <winsock.h>, except Plink which _needs_ WinSock 2 so it already
54 # does this.
55 #
56 # - COMPAT=/DNO_SECURITY (Windows only)
57 # Disables Pageant's use of <aclapi.h>, which is not available
58 # with some development environments (such as older versions of
59 # the Cygwin/mingw GNU toolchain). This means that Pageant
60 # won't care about the local user ID of processes accessing it; a
61 # version of Pageant built with this option will therefore refuse
62 # to run under NT-series OSes on security grounds (although it
63 # will run fine on Win95-series OSes where there is no access
64 # control anyway).
65 #
66 # - COMPAT=/DNO_MULTIMON (Windows only)
67 # Disables PuTTY's use of <multimon.h>, which is not available
68 # with some development environments. This means that PuTTY's
69 # full-screen mode (configurable to work on Alt-Enter) will
70 # not behave usefully in a multi-monitor environment.
71 #
72 # Note that this definition is always enabled in the Cygwin
73 # build, since at the time of writing this <multimon.h> is
74 # known not to be available in Cygwin.
75 #
76 # - COMPAT=/DNO_HTMLHELP (Windows only)
77 # Disables PuTTY's use of <htmlhelp.h>, which is not available
78 # with some development environments. The resulting binary
79 # will only look for an old-style WinHelp file (.HLP/.CNT), and
80 # will ignore any .CHM file.
81 #
82 # Note that this definition is always enabled in the Cygwin
83 # build, since at the time of writing this <htmlhelp.h> is
84 # known not to be available in Cygwin.
85 #
86 # - RCFL=/DNO_MANIFESTS (Windows only)
87 # Disables inclusion of XML application manifests in the PuTTY
88 # binaries. This may be necessary to build for 64-bit Windows;
89 # the manifests are only included to use the XP GUI style on
90 # Windows XP, and the architecture tags are a lie on 64-bit.
91 #
92 # - COMPAT=/DNO_IPV6
93 # Disables PuTTY's ability to make IPv6 connections, enabling
94 # it to compile under development environments which do not
95 # support IPv6 in their header files.
96 #
97 # - COMPAT=/DMSVC4 (Windows only)
98 # - RCFL=/DMSVC4
99 # Makes a couple of minor changes so that PuTTY compiles using
100 # MSVC 4. You will also need /DNO_SECURITY and /DNO_MULTIMON.
101 #
102 # - RCFL=/DASCIICTLS (Windows only)
103 # Uses ASCII rather than Unicode to specify the tab control in
104 # the resource file. Probably most useful when compiling with
105 # Cygnus/mingw32, whose resource compiler may have less of a
106 # problem with it.
107 #
108 # - XFLAGS=/DTELNET_DEFAULT
109 # Causes PuTTY to default to the Telnet protocol (in the absence
110 # of Default Settings and so on to the contrary). Normally PuTTY
111 # will default to SSH.
112 #
113 # - XFLAGS=/DDEBUG
114 # Causes PuTTY to enable internal debugging.
115 #
116 # - XFLAGS=/DMALLOC_LOG
117 # Causes PuTTY to emit a file called putty_mem.log, logging every
118 # memory allocation and free, so you can track memory leaks.
119 #
120 # - XFLAGS=/DMINEFIELD (Windows only)
121 # Causes PuTTY to use a custom memory allocator, similar in
122 # concept to Electric Fence, in place of regular malloc(). Wastes
123 # huge amounts of RAM, but should cause heap-corruption bugs to
124 # show up as GPFs at the point of failure rather than appearing
125 # later on as second-level damage.
126 #
127 !end
128
129 # ------------------------------------------------------------
130 # Additional text added verbatim to each individual Makefile.
131
132 # Hack to force version.o to be rebuilt always.
133 !begin vc
134 version.obj: *.c *.h *.rc
135 cl $(VER) $(CFLAGS) /c ..\version.c
136 !end
137 !specialobj vc version
138 !begin cygwin
139 version.o: FORCE
140 $(CC) $(COMPAT) $(XFLAGS) $(CFLAGS) $(VER) -c ../version.c
141 !end
142 !specialobj cygwin version
143 !begin borland
144 version.obj: FORCE
145 bcc32 $(VER) $(CFLAGS) /c ..\version.c
146 !end
147 !specialobj borland version
148 !begin lcc
149 version.obj: FORCE
150 lcc $(VER) $(CFLAGS) /c ..\version.c
151 !end
152 !specialobj lcc version
153 # For Unix, we also need the gross MD5 hack that causes automatic
154 # version number selection in release source archives.
155 !begin gtk
156 version.o: FORCE
157 if test -z "$(VER)" && (cd ..; md5sum -c manifest); then \
158 $(CC) $(COMPAT) $(XFLAGS) $(CFLAGS) `cat ../version.def` -c ../version.c; \
159 else \
160 $(CC) $(COMPAT) $(XFLAGS) $(CFLAGS) $(VER) -c ../version.c; \
161 fi
162 !end
163 !specialobj gtk version
164
165 # Add VER to Windows resource targets, and force them to be rebuilt every
166 # time, on the assumption that they will contain version information.
167 !begin vc vars
168 RCFLAGS = $(RCFLAGS) $(VER)
169 !end
170 !begin cygwin vars
171 # XXX GNU-ism, but it's probably all right for a Cygwin/MinGW Makefile.
172 RCFLAGS += $(patsubst -D%,--define %,$(VER))
173 !end
174 !begin borland vars
175 # Borland doesn't support +=. This probably shouldn't work, but seems to.
176 RCFLAGS = $(RCFLAGS) $(VER)
177 !end
178 !begin lcc vars
179 RCFLAGS += $(VER)
180 !end
181 !forceobj putty.res
182 !forceobj puttytel.res
183 !forceobj plink.res
184 !forceobj pscp.res
185 !forceobj psftp.res
186 !forceobj pageant.res
187 !forceobj puttygen.res
188
189 # `make install' target for Unix.
190 !begin gtk
191 install:
192 $(INSTALL_PROGRAM) -m 755 plink $(DESTDIR)$(bindir)/plink
193 $(INSTALL_PROGRAM) -m 755 pscp $(DESTDIR)$(bindir)/pscp
194 $(INSTALL_PROGRAM) -m 755 psftp $(DESTDIR)$(bindir)/psftp
195 $(INSTALL_PROGRAM) -m 755 pterm $(DESTDIR)$(bindir)/pterm
196 if test -n "$(UTMP_GROUP)"; then \
197 chgrp $(UTMP_GROUP) $(DESTDIR)$(bindir)/pterm && \
198 chmod 2755 $(DESTDIR)$(bindir)/pterm; \
199 elif test -n "$(UTMP_USER)"; then \
200 chown $(UTMP_USER) $(DESTDIR)$(bindir)/pterm && \
201 chmod 4755 $(DESTDIR)$(bindir)/pterm; \
202 fi
203 $(INSTALL_PROGRAM) -m 755 putty $(DESTDIR)$(bindir)/putty
204 $(INSTALL_PROGRAM) -m 755 puttygen $(DESTDIR)$(bindir)/puttygen
205 $(INSTALL_PROGRAM) -m 755 puttytel $(DESTDIR)$(bindir)/puttytel
206 $(INSTALL_DATA) -m 644 ../doc/plink.1 $(DESTDIR)$(man1dir)/plink.1
207 $(INSTALL_DATA) -m 644 ../doc/pscp.1 $(DESTDIR)$(man1dir)/pscp.1
208 $(INSTALL_DATA) -m 644 ../doc/psftp.1 $(DESTDIR)$(man1dir)/psftp.1
209 $(INSTALL_DATA) -m 644 ../doc/pterm.1 $(DESTDIR)$(man1dir)/pterm.1
210 $(INSTALL_DATA) -m 644 ../doc/putty.1 $(DESTDIR)$(man1dir)/putty.1
211 $(INSTALL_DATA) -m 644 ../doc/puttygen.1 $(DESTDIR)$(man1dir)/puttygen.1
212 $(INSTALL_DATA) -m 644 ../doc/puttytel.1 $(DESTDIR)$(man1dir)/puttytel.1
213
214 install-strip:
215 $(MAKE) install INSTALL_PROGRAM="$(INSTALL_PROGRAM) -s"
216 !end
217 !begin osx vars
218 CFLAGS += -DMACOSX
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
230
231 # GUI front end and terminal emulator (putty, puttytel).
232 GUITERM = TERMINAL window windlg winctrls sizetip winucs winprint
233 + winutils wincfg sercfg winhelp
234
235 # Same thing on Unix.
236 UXTERM = TERMINAL uxcfg sercfg uxucs uxprint timing
237 GTKTERM = UXTERM gtkwin gtkcfg gtkdlg gtkcols gtkpanel xkeysym
238 OSXTERM = UXTERM osxwin osxdlg osxctrls
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 sshsh256 sshsh512 sshbn wildcard pinger ssharcf
247 WINSSH = SSH winnoise winpgntc
248 UXSSH = SSH uxnoise uxagentc
249 MACSSH = SSH macnoise
250
251 # SFTP implementation (pscp, psftp).
252 SFTP = sftp int64 logging
253
254 # Miscellaneous objects appearing in all the network utilities (not
255 # Pageant or PuTTYgen).
256 MISC = timing misc version settings tree234 proxy
257 WINMISC = MISC winstore winnet winhandl cmdline windefs winmisc winproxy
258 + wintime
259 UXMISC = MISC uxstore uxsel uxnet cmdline uxmisc uxproxy time
260 OSXMISC = MISC uxstore uxsel osxsel uxnet uxmisc uxproxy time
261 MACMISC = MISC macstore macnet mtcpnet otnet macmisc macabout pproxy
262
263 # Character set library, for use in pterm.
264 CHARSET = sbcsdat slookup sbcs utf8 toucs fromucs xenc mimeenc macenc localenc
265
266 # Standard libraries.
267 LIBS = advapi32.lib user32.lib gdi32.lib comctl32.lib comdlg32.lib
268 + shell32.lib winmm.lib imm32.lib winspool.lib
269
270 # Network backend sets. This also brings in the relevant attachment
271 # to proxy.c depending on whether we're crypto-avoidant or not.
272 BE_ALL = be_all cproxy
273 BE_NOSSH = be_nossh nocproxy
274 BE_SSH = be_none cproxy
275 BE_NONE = be_none nocproxy
276 # More backend sets, with the additional Windows serial-port module.
277 W_BE_ALL = be_all_s winser cproxy
278 W_BE_NOSSH = be_nos_s winser nocproxy
279 # And with the Unix serial-port module.
280 U_BE_ALL = be_all_s uxser cproxy
281 U_BE_NOSSH = be_nos_s uxser nocproxy
282
283 # ------------------------------------------------------------
284 # Definitions of actual programs. The program name, followed by a
285 # colon, followed by a list of objects. Also in the list may be the
286 # keywords [G] for Windows GUI app, [C] for Console app, [X] for
287 # X/GTK Unix app, [U] for command-line Unix app, [M] for Macintosh app.
288
289 putty : [G] GUITERM NONSSH WINSSH W_BE_ALL WINMISC putty.res LIBS
290 puttytel : [G] GUITERM NONSSH W_BE_NOSSH WINMISC puttytel.res LIBS
291 plink : [C] winplink wincons NONSSH WINSSH W_BE_ALL logging WINMISC
292 + plink.res LIBS
293 pscp : [C] pscp winsftp wincons WINSSH BE_SSH SFTP wildcard WINMISC
294 + pscp.res LIBS
295 psftp : [C] psftp winsftp wincons WINSSH BE_SSH SFTP wildcard WINMISC
296 + psftp.res LIBS
297
298 pageant : [G] winpgnt sshrsa sshpubk sshdes sshbn sshmd5 version tree234
299 + misc sshaes sshsha winpgntc sshdss sshsh512 winutils winmisc
300 + winhelp pageant.res LIBS
301
302 puttygen : [G] winpgen sshrsag sshdssg sshprime sshdes sshbn sshmd5 version
303 + sshrand winnoise sshsha winstore misc winctrls sshrsa sshdss winmisc
304 + sshpubk sshaes sshsh512 import winutils puttygen.res tree234
305 + notiming winhelp LIBS wintime
306
307 pterm : [X] GTKTERM uxmisc misc ldisc settings uxpty uxsel BE_NONE uxstore
308 + uxsignal CHARSET cmdline uxpterm version time
309 putty : [X] GTKTERM uxmisc misc ldisc settings uxsel U_BE_ALL uxstore
310 + uxsignal CHARSET uxputty NONSSH UXSSH UXMISC ux_x11
311 puttytel : [X] GTKTERM uxmisc misc ldisc settings uxsel U_BE_NOSSH
312 + uxstore uxsignal CHARSET uxputty NONSSH UXMISC
313
314 plink : [U] uxplink uxcons NONSSH UXSSH U_BE_ALL logging UXMISC uxsignal
315 + ux_x11
316
317 puttygen : [U] cmdgen sshrsag sshdssg sshprime sshdes sshbn sshmd5 version
318 + sshrand uxnoise sshsha misc sshrsa sshdss uxcons uxstore uxmisc
319 + sshpubk sshaes sshsh512 import puttygen.res time tree234 uxgen
320 + notiming
321
322 pscp : [U] pscp uxsftp uxcons UXSSH BE_SSH SFTP wildcard UXMISC
323 psftp : [U] psftp uxsftp uxcons UXSSH BE_SSH SFTP wildcard UXMISC
324
325 PuTTY : [M] terminal wcwidth ldiscucs logging BE_ALL mac macdlg macevlog
326 + macterm macucs mac_res.rsrc testback NONSSH MACSSH MACMISC CHARSET
327 + stricmp vsnprint dialog config macctrls minibidi
328 PuTTYtel : [M] terminal wcwidth ldiscucs logging BE_NOSSH mac macdlg
329 + macevlog macterm macucs mac_res.rsrc testback NONSSH MACMISC
330 + CHARSET stricmp vsnprint dialog config macctrls minibidi
331 PuTTYgen : [M] macpgen sshrsag sshdssg sshprime sshdes sshbn sshmd5 version
332 + sshrand macnoise sshsha macstore misc sshrsa sshdss macmisc sshpubk
333 + sshaes sshsh512 import macpgen.rsrc macpgkey macabout
334
335 PuTTY : [MX] osxmain OSXTERM OSXMISC CHARSET U_BE_ALL NONSSH UXSSH
336 + ux_x11 uxpty uxsignal testback putty.icns info.plist