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