Don't bother compiling SHA-256 for now -- I need to think a bit before I use
[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
40 # Generates executables whose About box report them as being a
41 # development snapshot.
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 # - RCFL=/DNO_MANIFESTS (Windows only)
77 # Disables inclusion of XML application manifests in the PuTTY
78 # binaries. This may be necessary to build for 64-bit Windows;
79 # the manifests are only included to use the XP GUI style on
80 # Windows XP, and the architecture tags are a lie on 64-bit.
81 #
82 # - COMPAT=/DNO_IPV6
83 # Disables PuTTY's ability to make IPv6 connections, enabling
84 # it to compile under development environments which do not
85 # support IPv6 in their header files.
86 #
87 # - COMPAT=/DMSVC4 (Windows only)
88 # - RCFL=/DMSVC4
89 # Makes a couple of minor changes so that PuTTY compiles using
90 # MSVC 4. You will also need /DNO_SECURITY and /DNO_MULTIMON.
91 #
92 # - RCFL=/DASCIICTLS (Windows only)
93 # Uses ASCII rather than Unicode to specify the tab control in
94 # the resource file. Probably most useful when compiling with
95 # Cygnus/mingw32, whose resource compiler may have less of a
96 # problem with it.
97 #
98 # - XFLAGS=/DTELNET_DEFAULT
99 # Causes PuTTY to default to the Telnet protocol (in the absence
100 # of Default Settings and so on to the contrary). Normally PuTTY
101 # will default to SSH.
102 #
103 # - XFLAGS=/DDEBUG
104 # Causes PuTTY to enable internal debugging.
105 #
106 # - XFLAGS=/DMALLOC_LOG
107 # Causes PuTTY to emit a file called putty_mem.log, logging every
108 # memory allocation and free, so you can track memory leaks.
109 #
110 # - XFLAGS=/DMINEFIELD (Windows only)
111 # Causes PuTTY to use a custom memory allocator, similar in
112 # concept to Electric Fence, in place of regular malloc(). Wastes
113 # huge amounts of RAM, but should cause heap-corruption bugs to
114 # show up as GPFs at the point of failure rather than appearing
115 # later on as second-level damage.
116 #
117 !end
118
119 # ------------------------------------------------------------
120 # Additional text added verbatim to each individual Makefile.
121
122 # Hack to force version.o to be rebuilt always.
123 !begin vc
124 version.obj: *.c *.h *.rc
125 cl $(VER) $(CFLAGS) /c ..\version.c
126 !end
127 !specialobj vc version
128 !begin cygwin
129 version.o: FORCE
130 FORCE:
131 $(CC) $(COMPAT) $(XFLAGS) $(CFLAGS) $(VER) -c ../version.c
132 !end
133 !specialobj cygwin version
134 !begin borland
135 version.obj: FORCE
136 FORCE:
137 bcc32 $(VER) $(CFLAGS) /c ..\version.c
138 !end
139 !specialobj borland version
140 !begin lcc
141 version.obj: FORCE
142 FORCE:
143 lcc $(VER) $(CFLAGS) /c ..\version.c
144 !end
145 !specialobj lcc version
146 # For Unix, we also need the gross MD5 hack that causes automatic
147 # version number selection in release source archives.
148 !begin gtk
149 version.o: FORCE;
150 FORCE:
151 if test -z "$(VER)" && (cd ..; md5sum -c manifest); then \
152 $(CC) $(COMPAT) $(XFLAGS) $(CFLAGS) `cat ../version.def` -c ../version.c; \
153 else \
154 $(CC) $(COMPAT) $(XFLAGS) $(CFLAGS) $(VER) -c ../version.c; \
155 fi
156 !end
157 !specialobj gtk version
158
159 # `make install' target for Unix.
160 !begin gtk
161 install:
162 $(INSTALL_PROGRAM) -m 755 plink $(DESTDIR)$(bindir)/plink
163 $(INSTALL_PROGRAM) -m 755 pscp $(DESTDIR)$(bindir)/pscp
164 $(INSTALL_PROGRAM) -m 755 psftp $(DESTDIR)$(bindir)/psftp
165 $(INSTALL_PROGRAM) -m 755 pterm $(DESTDIR)$(bindir)/pterm
166 if test -n "$(UTMP_GROUP)"; then \
167 chgrp $(UTMP_GROUP) $(DESTDIR)$(bindir)/pterm && \
168 chmod 2755 $(DESTDIR)$(bindir)/pterm; \
169 elif test -n "$(UTMP_USER)"; then \
170 chown $(UTMP_USER) $(DESTDIR)$(bindir)/pterm && \
171 chmod 4755 $(DESTDIR)$(bindir)/pterm; \
172 fi
173 $(INSTALL_PROGRAM) -m 755 putty $(DESTDIR)$(bindir)/putty
174 $(INSTALL_PROGRAM) -m 755 puttygen $(DESTDIR)$(bindir)/puttygen
175 $(INSTALL_PROGRAM) -m 755 puttytel $(DESTDIR)$(bindir)/puttytel
176 $(INSTALL_DATA) -m 644 ../doc/plink.1 $(DESTDIR)$(man1dir)/plink.1
177 $(INSTALL_DATA) -m 644 ../doc/pscp.1 $(DESTDIR)$(man1dir)/pscp.1
178 $(INSTALL_DATA) -m 644 ../doc/psftp.1 $(DESTDIR)$(man1dir)/psftp.1
179 $(INSTALL_DATA) -m 644 ../doc/pterm.1 $(DESTDIR)$(man1dir)/pterm.1
180 $(INSTALL_DATA) -m 644 ../doc/putty.1 $(DESTDIR)$(man1dir)/putty.1
181 $(INSTALL_DATA) -m 644 ../doc/puttygen.1 $(DESTDIR)$(man1dir)/puttygen.1
182 $(INSTALL_DATA) -m 644 ../doc/puttytel.1 $(DESTDIR)$(man1dir)/puttytel.1
183
184 install-strip:
185 $(MAKE) install INSTALL_PROGRAM="$(INSTALL_PROGRAM) -s"
186 !end
187 !begin osx vars
188 CFLAGS += -DMACOSX
189 !end
190
191 # ------------------------------------------------------------
192 # Definitions of object groups. A group name, followed by an =,
193 # followed by any number of objects or other already-defined group
194 # names. A line beginning `+' is assumed to continue the previous
195 # line.
196
197 # Terminal emulator and its (platform-independent) dependencies.
198 TERMINAL = terminal wcwidth ldiscucs logging tree234 minibidi
199 + config dialog
200
201 # GUI front end and terminal emulator (putty, puttytel).
202 GUITERM = TERMINAL window windlg winctrls sizetip winucs winprint
203 + winutils wincfg
204
205 # Same thing on Unix.
206 UXTERM = TERMINAL uxcfg uxucs uxprint timing
207 GTKTERM = UXTERM gtkwin gtkcfg gtkdlg gtkcols gtkpanel xkeysym
208 OSXTERM = UXTERM osxwin osxdlg osxctrls
209
210 # Non-SSH back ends (putty, puttytel, plink).
211 NONSSH = telnet raw rlogin ldisc pinger
212
213 # SSH back end (putty, plink, pscp, psftp).
214 SSH = ssh sshcrc sshdes sshmd5 sshrsa sshrand sshsha sshblowf
215 + sshdh sshcrcda sshpubk sshzlib sshdss x11fwd portfwd
216 + sshaes sshsh512 sshbn wildcard pinger ssharcf
217 WINSSH = SSH winnoise winpgntc
218 UXSSH = SSH uxnoise uxagentc
219 MACSSH = SSH macnoise
220
221 # SFTP implementation (pscp, psftp).
222 SFTP = sftp int64 logging
223
224 # Miscellaneous objects appearing in all the network utilities (not
225 # Pageant or PuTTYgen).
226 MISC = timing misc version settings tree234 proxy
227 WINMISC = MISC winstore winnet cmdline windefs winmisc pproxy wintime
228 UXMISC = MISC uxstore uxsel uxnet cmdline uxmisc uxproxy time
229 OSXMISC = MISC uxstore uxsel osxsel uxnet uxmisc uxproxy time
230 MACMISC = MISC macstore macnet mtcpnet otnet macmisc macabout pproxy
231
232 # Character set library, for use in pterm.
233 CHARSET = sbcsdat slookup sbcs utf8 toucs fromucs xenc mimeenc macenc localenc
234
235 # Standard libraries.
236 LIBS = advapi32.lib user32.lib gdi32.lib comctl32.lib comdlg32.lib
237 + shell32.lib winmm.lib imm32.lib winspool.lib
238
239 # Network backend sets. This also brings in the relevant attachment
240 # to proxy.c depending on whether we're crypto-avoidant or not.
241 BE_ALL = be_all cproxy
242 BE_NOSSH = be_nossh nocproxy
243 BE_SSH = be_none cproxy
244 BE_NONE = be_none nocproxy
245
246 # ------------------------------------------------------------
247 # Definitions of actual programs. The program name, followed by a
248 # colon, followed by a list of objects. Also in the list may be the
249 # keywords [G] for Windows GUI app, [C] for Console app, [X] for
250 # X/GTK Unix app, [U] for command-line Unix app, [M] for Macintosh app.
251
252 putty : [G] GUITERM NONSSH WINSSH BE_ALL WINMISC win_res.res LIBS
253 puttytel : [G] GUITERM NONSSH BE_NOSSH WINMISC win_res.res LIBS
254 plink : [C] winplink wincons NONSSH WINSSH BE_ALL logging WINMISC
255 + plink.res LIBS
256 pscp : [C] pscp winsftp wincons WINSSH BE_SSH SFTP wildcard WINMISC
257 + pscp.res LIBS
258 psftp : [C] psftp winsftp wincons WINSSH BE_SSH SFTP wildcard WINMISC
259 + pscp.res LIBS
260
261 pageant : [G] winpgnt sshrsa sshpubk sshdes sshbn sshmd5 version tree234
262 + misc sshaes sshsha winpgntc sshdss sshsh512 winutils winmisc
263 + pageant.res LIBS
264
265 puttygen : [G] winpgen sshrsag sshdssg sshprime sshdes sshbn sshmd5 version
266 + sshrand winnoise sshsha winstore misc winctrls sshrsa sshdss winmisc
267 + sshpubk sshaes sshsh512 import winutils puttygen.res tree234
268 + notiming LIBS wintime
269
270 pterm : [X] GTKTERM uxmisc misc ldisc settings uxpty uxsel BE_NONE uxstore
271 + uxsignal CHARSET cmdline uxpterm version time
272 putty : [X] GTKTERM uxmisc misc ldisc settings uxsel BE_ALL uxstore
273 + uxsignal CHARSET uxputty NONSSH UXSSH UXMISC ux_x11
274 puttytel : [X] GTKTERM uxmisc misc ldisc settings uxsel BE_NOSSH
275 + uxstore uxsignal CHARSET uxputty NONSSH UXMISC
276
277 plink : [U] uxplink uxcons NONSSH UXSSH BE_ALL logging UXMISC uxsignal ux_x11
278
279 puttygen : [U] cmdgen sshrsag sshdssg sshprime sshdes sshbn sshmd5 version
280 + sshrand uxnoise sshsha misc sshrsa sshdss uxcons uxstore uxmisc
281 + sshpubk sshaes sshsh512 import puttygen.res time tree234 uxgen
282 + notiming
283
284 pscp : [U] pscp uxsftp uxcons UXSSH BE_SSH SFTP wildcard UXMISC
285 psftp : [U] psftp uxsftp uxcons UXSSH BE_SSH SFTP wildcard UXMISC
286
287 PuTTY : [M] terminal wcwidth ldiscucs logging BE_ALL mac macdlg macevlog
288 + macterm macucs mac_res.rsrc testback NONSSH MACSSH MACMISC CHARSET
289 + stricmp vsnprint dialog config macctrls minibidi
290 PuTTYtel : [M] terminal wcwidth ldiscucs logging BE_NOSSH mac macdlg
291 + macevlog macterm macucs mac_res.rsrc testback NONSSH MACMISC
292 + CHARSET stricmp vsnprint dialog config macctrls minibidi
293 PuTTYgen : [M] macpgen sshrsag sshdssg sshprime sshdes sshbn sshmd5 version
294 + sshrand macnoise sshsha macstore misc sshrsa sshdss macmisc sshpubk
295 + sshaes sshsh512 import macpgen.rsrc macpgkey macabout
296
297 PuTTY : [MX] osxmain OSXTERM OSXMISC CHARSET BE_ALL NONSSH UXSSH
298 + ux_x11 uxpty uxsignal testback putty.icns info.plist