]> asedeno.scripts.mit.edu Git - PuTTY.git/blob - Recipe
Thanks to D H Becker for sending in an icon. I'd have liked to have
[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 mpw mac/Makefile.mpw
22 !makefile osx macosx/Makefile
23 # Source directories.
24 !srcdir charset/
25 !srcdir windows/
26 !srcdir unix/
27 !srcdir mac/
28 !srcdir macosx/
29
30 # Help text added to the top of each Makefile, with /D converted
31 # into -D as appropriate for the particular Makefile.
32
33 !begin help
34 #
35 # Extra options you can set:
36 #
37 #  - VER=/DSNAPSHOT=1999-01-25
38 #      Generates executables whose About box report them as being a
39 #      development snapshot.
40 #
41 #  - VER=/DRELEASE=0.43
42 #      Generates executables whose About box report them as being a
43 #      release version.
44 #
45 #  - COMPAT=/DAUTO_WINSOCK
46 #      Causes PuTTY to assume that <windows.h> includes its own WinSock
47 #      header file, so that it won't try to include <winsock.h>.
48 #
49 #  - COMPAT=/DWINSOCK_TWO
50 #      Causes the PuTTY utilities to include <winsock2.h> instead of
51 #      <winsock.h>, except Plink which _needs_ WinSock 2 so it already
52 #      does this.
53 #
54 #  - COMPAT=/DNO_SECURITY
55 #      Disables Pageant's use of <aclapi.h>, which is not available
56 #      with some development environments (such as older versions of
57 #      the Cygwin/mingw GNU toolchain). This means that Pageant
58 #      won't care about the local user ID of processes accessing it; a
59 #      version of Pageant built with this option will therefore refuse
60 #      to run under NT-series OSes on security grounds (although it
61 #      will run fine on Win95-series OSes where there is no access
62 #      control anyway).
63 #
64 #  - COMPAT=/DNO_MULTIMON
65 #      Disables PuTTY's use of <multimon.h>, which is not available
66 #      with some development environments. This means that PuTTY's
67 #      full-screen mode (configurable to work on Alt-Enter) will
68 #      not behave usefully in a multi-monitor environment.
69 #
70 #      Note that this definition is always enabled in the Cygwin
71 #      build, since at the time of writing this <multimon.h> is
72 #      known not to be available in Cygwin.
73 #
74 #  - COMPAT=/DNO_IPV6
75 #      Disables PuTTY's ability to make IPv6 connections, enabling
76 #      it to compile under development environments which do not
77 #      support IPv6 in their header files.
78 #
79 #  - COMPAT=/DMSVC4
80 #  - RCFL=/DMSVC4
81 #      Makes a couple of minor changes so that PuTTY compiles using
82 #      MSVC 4. You will also need /DNO_SECURITY and /DNO_MULTIMON.
83 #
84 #  - RCFL=/DASCIICTLS
85 #      Uses ASCII rather than Unicode to specify the tab control in
86 #      the resource file. Probably most useful when compiling with
87 #      Cygnus/mingw32, whose resource compiler may have less of a
88 #      problem with it.
89 #
90 #  - XFLAGS=/DTELNET_DEFAULT
91 #      Causes PuTTY to default to the Telnet protocol (in the absence
92 #      of Default Settings and so on to the contrary). Normally PuTTY
93 #      will default to SSH.
94 #
95 #  - XFLAGS=/DDEBUG
96 #      Causes PuTTY to enable internal debugging.
97 #
98 #  - XFLAGS=/DMALLOC_LOG
99 #      Causes PuTTY to emit a file called putty_mem.log, logging every
100 #      memory allocation and free, so you can track memory leaks.
101 #
102 #  - XFLAGS=/DMINEFIELD
103 #      Causes PuTTY to use a custom memory allocator, similar in
104 #      concept to Electric Fence, in place of regular malloc(). Wastes
105 #      huge amounts of RAM, but should cause heap-corruption bugs to
106 #      show up as GPFs at the point of failure rather than appearing
107 #      later on as second-level damage.
108 #
109 !end
110
111 # ------------------------------------------------------------
112 # Additional text added verbatim to each individual Makefile.
113
114 # Hack to force version.o to be rebuilt always.
115 !begin vc
116 version.obj: *.c *.h *.rc
117         cl $(VER) $(CFLAGS) /c ..\version.c
118 !end
119 !specialobj vc version
120 !begin cygwin
121 version.o: FORCE
122 FORCE:
123         $(CC) $(COMPAT) $(XFLAGS) $(CFLAGS) $(VER) -c ../version.c
124 !end
125 !specialobj cygwin version
126 !begin borland
127 version.obj: FORCE
128 FORCE:
129         bcc32 $(VER) $(CFLAGS) /c ..\version.c
130 !end
131 !specialobj borland version
132 !begin lcc
133 version.obj: FORCE
134 FORCE:
135         lcc $(VER) $(CFLAGS) /c ..\version.c
136 !end
137 !specialobj lcc version
138 # For Unix, we also need the gross MD5 hack that causes automatic
139 # version number selection in release source archives.
140 !begin gtk
141 version.o: FORCE;
142 FORCE:
143         if test -z "$(VER)" && (cd ..; md5sum -c manifest); then \
144                 $(CC) $(COMPAT) $(XFLAGS) $(CFLAGS) `cat ../version.def` -c ../version.c; \
145         else \
146                 $(CC) $(COMPAT) $(XFLAGS) $(CFLAGS) $(VER) -c ../version.c; \
147         fi
148 !end
149 !specialobj gtk version
150
151 # `make install' target for Unix.
152 !begin gtk
153 install:
154         $(INSTALL_PROGRAM) -m 755 plink $(DESTDIR)$(bindir)/plink
155         $(INSTALL_PROGRAM) -m 755 pscp $(DESTDIR)$(bindir)/pscp
156         $(INSTALL_PROGRAM) -m 755 psftp $(DESTDIR)$(bindir)/psftp
157         $(INSTALL_PROGRAM) -m 755 pterm $(DESTDIR)$(bindir)/pterm
158         if test -n "$(UTMP_GROUP)"; then \
159           chgrp $(UTMP_GROUP) $(DESTDIR)$(bindir)/pterm && \
160             chmod 2755 $(DESTDIR)$(bindir)/pterm; \
161         elif test -n "$(UTMP_USER)"; then \
162           chown $(UTMP_USER) $(DESTDIR)$(bindir)/pterm && \
163             chmod 4755 $(DESTDIR)$(bindir)/pterm; \
164         fi
165         $(INSTALL_PROGRAM) -m 755 putty $(DESTDIR)$(bindir)/putty
166         $(INSTALL_PROGRAM) -m 755 puttygen $(DESTDIR)$(bindir)/puttygen
167         $(INSTALL_PROGRAM) -m 755 puttytel $(DESTDIR)$(bindir)/puttytel
168         $(INSTALL_DATA) -m 644 ../doc/plink.1 $(DESTDIR)$(man1dir)/plink.1
169         $(INSTALL_DATA) -m 644 ../doc/pscp.1 $(DESTDIR)$(man1dir)/pscp.1
170         $(INSTALL_DATA) -m 644 ../doc/psftp.1 $(DESTDIR)$(man1dir)/psftp.1
171         $(INSTALL_DATA) -m 644 ../doc/pterm.1 $(DESTDIR)$(man1dir)/pterm.1
172         $(INSTALL_DATA) -m 644 ../doc/putty.1 $(DESTDIR)$(man1dir)/putty.1
173         $(INSTALL_DATA) -m 644 ../doc/puttygen.1 $(DESTDIR)$(man1dir)/puttygen.1
174         $(INSTALL_DATA) -m 644 ../doc/puttytel.1 $(DESTDIR)$(man1dir)/puttytel.1
175
176 install-strip:
177         $(MAKE) install INSTALL_PROGRAM="$(INSTALL_PROGRAM) -s"
178 !end
179 !begin osx vars
180 CFLAGS += -DMACOSX
181 !end
182
183 # ------------------------------------------------------------
184 # Definitions of object groups. A group name, followed by an =,
185 # followed by any number of objects or other already-defined group
186 # names. A line beginning `+' is assumed to continue the previous
187 # line.
188
189 # Terminal emulator and its (platform-independent) dependencies.
190 TERMINAL = terminal wcwidth ldiscucs logging tree234 minibidi
191          + config dialog
192
193 # GUI front end and terminal emulator (putty, puttytel).
194 GUITERM  = TERMINAL window windlg winctrls sizetip winucs winprint
195          + winutils wincfg
196
197 # Same thing on Unix.
198 UXTERM   = TERMINAL uxcfg uxucs uxprint timing
199 GTKTERM  = UXTERM gtkwin gtkcfg gtkdlg gtkcols gtkpanel xkeysym
200 OSXTERM  = UXTERM osxwin osxdlg osxctrls
201
202 # Non-SSH back ends (putty, puttytel, plink).
203 NONSSH   = telnet raw rlogin ldisc pinger
204
205 # SSH back end (putty, plink, pscp, psftp).
206 SSH      = ssh sshcrc sshdes sshmd5 sshrsa sshrand sshsha sshblowf
207          + sshdh sshcrcda sshpubk sshzlib sshdss x11fwd portfwd
208          + sshaes sshsh512 sshbn wildcard pinger
209 WINSSH   = SSH winnoise winpgntc
210 UXSSH    = SSH uxnoise uxagentc
211 MACSSH   = SSH macnoise
212
213 # SFTP implementation (pscp, psftp).
214 SFTP     = sftp int64 logging
215
216 # Miscellaneous objects appearing in all the network utilities (not
217 # Pageant or PuTTYgen).
218 MISC     = timing misc version settings tree234 proxy
219 WINMISC  = MISC winstore winnet cmdline windefs winmisc pproxy wintime
220 UXMISC   = MISC uxstore uxsel uxnet cmdline uxmisc uxproxy time
221 OSXMISC  = MISC uxstore uxsel osxsel uxnet uxmisc uxproxy time
222 MACMISC  = MISC macstore macnet mtcpnet otnet macmisc macabout pproxy
223
224 # Character set library, for use in pterm.
225 CHARSET  = sbcsdat slookup sbcs utf8 toucs fromucs xenc mimeenc macenc localenc
226
227 # Standard libraries.
228 LIBS     = advapi32.lib user32.lib gdi32.lib comctl32.lib comdlg32.lib
229          + shell32.lib winmm.lib imm32.lib winspool.lib
230
231 # Network backend sets. This also brings in the relevant attachment
232 # to proxy.c depending on whether we're crypto-avoidant or not.
233 BE_ALL   = be_all cproxy
234 BE_NOSSH = be_nossh nocproxy
235 BE_SSH   = be_none cproxy
236 BE_NONE  = be_none nocproxy
237
238 # ------------------------------------------------------------
239 # Definitions of actual programs. The program name, followed by a
240 # colon, followed by a list of objects. Also in the list may be the
241 # keywords [G] for Windows GUI app, [C] for Console app, [X] for
242 # X/GTK Unix app, [U] for command-line Unix app, [M] for Macintosh app.
243
244 putty    : [G] GUITERM NONSSH WINSSH BE_ALL WINMISC win_res.res LIBS
245 puttytel : [G] GUITERM NONSSH BE_NOSSH WINMISC win_res.res LIBS
246 plink    : [C] winplink wincons NONSSH WINSSH BE_ALL logging WINMISC
247          + plink.res LIBS
248 pscp     : [C] pscp winsftp wincons WINSSH BE_SSH SFTP wildcard WINMISC
249          + pscp.res LIBS
250 psftp    : [C] psftp winsftp wincons WINSSH BE_SSH SFTP wildcard WINMISC
251          + pscp.res LIBS
252
253 pageant  : [G] winpgnt sshrsa sshpubk sshdes sshbn sshmd5 version tree234
254          + misc sshaes sshsha winpgntc sshdss sshsh512 winutils winmisc
255          + pageant.res LIBS
256
257 puttygen : [G] winpgen sshrsag sshdssg sshprime sshdes sshbn sshmd5 version
258          + sshrand winnoise sshsha winstore misc winctrls sshrsa sshdss winmisc
259          + sshpubk sshaes sshsh512 import winutils puttygen.res tree234
260          + notiming LIBS wintime
261
262 pterm    : [X] GTKTERM uxmisc misc ldisc settings uxpty uxsel BE_NONE uxstore
263          + uxsignal CHARSET cmdline uxpterm version time
264 putty    : [X] GTKTERM uxmisc misc ldisc settings uxsel BE_ALL uxstore
265          + uxsignal CHARSET uxputty NONSSH UXSSH UXMISC ux_x11
266 puttytel : [X] GTKTERM uxmisc misc ldisc settings uxsel BE_NOSSH
267          + uxstore uxsignal CHARSET uxputty NONSSH UXMISC
268
269 plink    : [U] uxplink uxcons NONSSH UXSSH BE_ALL logging UXMISC uxsignal ux_x11
270
271 puttygen : [U] cmdgen sshrsag sshdssg sshprime sshdes sshbn sshmd5 version
272          + sshrand uxnoise sshsha misc sshrsa sshdss uxcons uxstore uxmisc
273          + sshpubk sshaes sshsh512 import puttygen.res time tree234 uxgen
274          + notiming
275
276 pscp     : [U] pscp uxsftp uxcons UXSSH BE_SSH SFTP wildcard UXMISC
277 psftp    : [U] psftp uxsftp uxcons UXSSH BE_SSH SFTP wildcard UXMISC
278
279 PuTTY    : [M] terminal wcwidth ldiscucs logging BE_ALL mac macdlg macevlog
280          + macterm macucs mac_res.rsrc testback NONSSH MACSSH MACMISC CHARSET
281          + stricmp vsnprint dialog config macctrls minibidi
282 PuTTYtel : [M] terminal wcwidth ldiscucs logging BE_NOSSH mac macdlg
283          + macevlog macterm macucs mac_res.rsrc testback NONSSH MACMISC
284          + CHARSET stricmp vsnprint dialog config macctrls minibidi
285 PuTTYgen : [M] macpgen sshrsag sshdssg sshprime sshdes sshbn sshmd5 version
286          + sshrand macnoise sshsha macstore misc sshrsa sshdss macmisc sshpubk
287          + sshaes sshsh512 import macpgen.rsrc macpgkey macabout
288
289 PuTTY    : [MX] osxmain OSXTERM OSXMISC CHARSET BE_ALL NONSSH UXSSH
290          + ux_x11 uxpty uxsignal testback putty.icns info.plist