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