]> asedeno.scripts.mit.edu Git - PuTTY.git/blob - Recipe
Fix error reporting pointer parameters in winsecur.c.
[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.mgw
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 am Makefile.am
23 !makefile devcppproj windows/DEVCPP
24 !makefile vstudio10 windows/VS2010
25 !makefile vstudio12 windows/VS2012
26 # Source directories.
27 !srcdir charset/
28 !srcdir windows/
29 !srcdir unix/
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 #  - COMPAT=/DAUTO_WINSOCK (Windows only)
39 #      Causes PuTTY to assume that <windows.h> includes its own WinSock
40 #      header file, so that it won't try to include <winsock.h>.
41 #
42 #  - COMPAT=/DWINSOCK_TWO (Windows only)
43 #      Causes the PuTTY utilities to include <winsock2.h> instead of
44 #      <winsock.h>, except Plink which _needs_ WinSock 2 so it already
45 #      does this.
46 #
47 #  - COMPAT=/DNO_SECURITY (Windows only)
48 #      Disables use of <aclapi.h>, which is not available with some
49 #      development environments (such as very old versions of the
50 #      mingw/Cygwin GNU toolchain). This has the following effects:
51 #       - Pageant won't care about the local user ID of processes
52 #         accessing it; a version of Pageant built with this option
53 #         will therefore refuse to run under NT-series OSes on
54 #         security grounds (although it will run fine on Win95-series
55 #         OSes where there is no access control anyway).
56 #       - SSH connection sharing is disabled.
57 #       - There is no support for restriction of the process ACLs.
58 #
59 #  - COMPAT=/DNO_MULTIMON (Windows only)
60 #      Disables PuTTY's use of <multimon.h>, which is not available
61 #      with some development environments. This means that PuTTY's
62 #      full-screen mode (configurable to work on Alt-Enter) will
63 #      not behave usefully in a multi-monitor environment.
64 #
65 #  - COMPAT=/DNO_HTMLHELP (Windows only)
66 #      Disables PuTTY's use of <htmlhelp.h>, which is not available
67 #      with some development environments. The resulting binary
68 #      will only look for an old-style WinHelp file (.HLP/.CNT), and
69 #      will ignore any .CHM file.
70 #
71 #      If you don't have this header, you may be able to use the copy
72 #      supplied with HTML Help Workshop.
73 #
74 #  - RCFL=/DNO_MANIFESTS (Windows only)
75 #      Disables inclusion of XML application manifests in the PuTTY
76 #      binaries. This may be necessary to build for 64-bit Windows;
77 #      the manifests are only included to use the XP GUI style on
78 #      Windows XP, and the architecture tags are a lie on 64-bit.
79 #
80 #  - COMPAT=/DNO_IPV6
81 #      Disables PuTTY's ability to make IPv6 connections, enabling
82 #      it to compile under development environments which do not
83 #      support IPv6 in their header files.
84 #
85 #  - COMPAT=/DNO_GSSAPI
86 #      Disables PuTTY's ability to use GSSAPI functions for
87 #      authentication and key exchange.
88 #
89 #  - COMPAT=/DSTATIC_GSSAPI
90 #      Causes PuTTY to try to link statically against the GSSAPI
91 #      library instead of the default of doing it at run time.
92 #
93 #  - COMPAT=/DMSVC4 (Windows only)
94 #  - RCFL=/DMSVC4
95 #      Makes a couple of minor changes so that PuTTY compiles using
96 #      MSVC 4. You will also need /DNO_SECURITY and /DNO_MULTIMON.
97 #
98 #  - COMPAT=/DNO_SECUREZEROMEMORY (Windows only)
99 #      Disables PuTTY's use of SecureZeroMemory(), which is missing
100 #      from some environments' header files.
101 #
102 #  - XFLAGS=/DTELNET_DEFAULT
103 #      Causes PuTTY to default to the Telnet protocol (in the absence
104 #      of Default Settings and so on to the contrary). Normally PuTTY
105 #      will default to SSH.
106 #
107 #  - XFLAGS=/DDEBUG
108 #      Causes PuTTY to enable internal debugging.
109 #
110 #  - XFLAGS=/DMALLOC_LOG
111 #      Causes PuTTY to emit a file called putty_mem.log, logging every
112 #      memory allocation and free, so you can track memory leaks.
113 #
114 #  - XFLAGS=/DMINEFIELD (Windows only)
115 #      Causes PuTTY to use a custom memory allocator, similar in
116 #      concept to Electric Fence, in place of regular malloc(). Wastes
117 #      huge amounts of RAM, but should cause heap-corruption bugs to
118 #      show up as GPFs at the point of failure rather than appearing
119 #      later on as second-level damage.
120 #
121 #  - XFLAGS=/DFUZZING
122 #      Builds a version of PuTTY with some tweaks to make fuzz testing
123 #      easier: the SSH random number generator is replaced by one that
124 #      always returns the same thing.  Note that this makes SSH
125 #      completely insecure -- a FUZZING build should never be used to
126 #      connect to a real server.
127 !end
128
129 # ------------------------------------------------------------
130 # Additional text added verbatim to each individual Makefile.
131
132 !cflags am version
133 !begin am
134 if AUTO_GIT_COMMIT
135 BUILT_SOURCES = empty.h
136 CLEANFILES = empty.h
137 libversion_a_CFLAGS += -DSOURCE_COMMIT=\"`git --git-dir=$(srcdir)/.git rev-parse HEAD 2>/dev/null`\"
138 empty.h: $(allsources)
139         echo '/* Empty file touched by automake makefile to force rebuild of version.o */' >$@
140 endif
141 !end
142 !begin >empty.h
143 /* Empty file touched by automake makefile to force rebuild of version.o */
144 !end
145
146 !begin vc vars
147 CFLAGS = $(CFLAGS) /DHAS_GSSAPI
148 !end
149
150 # `make install' target for Unix.
151 !begin gtk
152 install:
153         mkdir -p $(DESTDIR)$(bindir) $(DESTDIR)$(man1dir)
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
180 # List the man pages for the automake makefile.
181 !begin am
182 man1_MANS = doc/plink.1 doc/pscp.1 doc/psftp.1 doc/pterm.1 \
183             doc/putty.1 doc/puttygen.1 doc/puttytel.1
184 !end
185
186 # In automake, chgrp/chmod pterm after installation, if configured to.
187 !begin am
188 if HAVE_SETID_CMD
189 install-exec-local:
190         @SETID_CMD@ $(bindir)/pterm
191         chmod @SETID_MODE@ $(bindir)/pterm
192 endif
193 !end
194
195 # In automake makefile, build the OS X app bundle, if configured in
196 # Quartz mode.
197 !begin am
198 if HAVE_QUARTZ
199 noinst_SCRIPTS = unix/PuTTY.app unix/Pterm.app
200 unix/PuTTY.app: unix/putty.bundle puttyapp osxlaunch
201         rm -rf $@ && gtk-mac-bundler $<
202 unix/Pterm.app: unix/pterm.bundle ptermapp osxlaunch
203         rm -rf $@ && gtk-mac-bundler $<
204 endif
205 !end
206
207 # Random symbols.
208 !begin cygwin vars
209 # _WIN32_IE is required to expose identifiers that only make sense on
210 # systems with IE5+ installed, such as some arguments to SHGetFolderPath().
211 # WINVER etc perform a similar function for FlashWindowEx().
212 CFLAGS += -D_WIN32_IE=0x0500
213 CFLAGS += -DWINVER=0x0500 -D_WIN32_WINDOWS=0x0410 -D_WIN32_WINNT=0x0500
214 !end
215
216 # ------------------------------------------------------------
217 # Definitions of object groups. A group name, followed by an =,
218 # followed by any number of objects or other already-defined group
219 # names. A line beginning `+' is assumed to continue the previous
220 # line.
221
222 # Terminal emulator and its (platform-independent) dependencies.
223 TERMINAL = terminal wcwidth ldiscucs logging tree234 minibidi
224          + config dialog conf
225
226 # GUI front end and terminal emulator (putty, puttytel).
227 GUITERM  = TERMINAL window windlg winctrls sizetip winucs winprint
228          + winutils wincfg sercfg winhelp winjump miscucs
229
230 # Same thing on Unix.
231 UXTERM   = TERMINAL uxcfg sercfg uxucs uxprint timing callback miscucs
232 GTKTERM  = UXTERM gtkwin gtkcfg gtkdlg gtkfont gtkcols gtkmisc xkeysym
233          + x11misc gtkcomm
234
235 # Non-SSH back ends (putty, puttytel, plink).
236 NONSSH   = telnet raw rlogin ldisc pinger
237
238 # SSH back end (putty, plink, pscp, psftp).
239 SSH      = ssh sshcrc sshdes sshmd5 sshrsa sshrand sshsha sshblowf
240          + sshdh sshcrcda sshpubk sshzlib sshdss x11fwd portfwd
241          + sshaes sshccp sshsh256 sshsh512 sshbn wildcard pinger ssharcf
242          + sshgssc pgssapi sshshare sshecc aqsync
243 WINSSH   = SSH winnoise wincapi winpgntc wingss winshare winnps winnpc
244          + winhsock errsock
245 UXSSH    = SSH uxnoise uxagentc uxgss uxshare
246
247 # SFTP implementation (pscp, psftp).
248 SFTP     = sftp int64 logging
249
250 # Miscellaneous objects appearing in all the network utilities (not
251 # Pageant or PuTTYgen).
252 MISC     = timing callback misc version settings tree234 proxy conf be_misc
253 WINMISC  = MISC winstore winnet winhandl cmdline windefs winmisc winproxy
254          + wintime winhsock errsock winsecur
255 UXMISC   = MISC uxstore uxsel uxnet uxpeer cmdline uxmisc uxproxy time
256
257 # import.c and dependencies, for PuTTYgen-like utilities that have to
258 # load foreign key files.
259 IMPORT   = import sshbcrypt sshblowf
260
261 # Character set library, for use in pterm.
262 CHARSET  = sbcsdat slookup sbcs utf8 toucs fromucs xenc mimeenc macenc localenc
263
264 # Standard libraries.
265 LIBS     = advapi32.lib user32.lib gdi32.lib comctl32.lib comdlg32.lib
266          + shell32.lib winmm.lib imm32.lib winspool.lib ole32.lib
267
268 # Network backend sets. This also brings in the relevant attachment
269 # to proxy.c depending on whether we're crypto-avoidant or not.
270 BE_ALL   = be_all cproxy
271 BE_NOSSH = be_nossh nocproxy
272 BE_SSH   = be_ssh cproxy
273 BE_NONE  = be_none nocproxy
274 # More backend sets, with the additional Windows serial-port module.
275 W_BE_ALL = be_all_s winser cproxy
276 W_BE_NOSSH = be_nos_s winser nocproxy
277 # And with the Unix serial-port module.
278 U_BE_ALL = be_all_s uxser cproxy
279 U_BE_NOSSH = be_nos_s uxser nocproxy
280
281 # ------------------------------------------------------------
282 # Definitions of actual programs. The program name, followed by a
283 # colon, followed by a list of objects. Also in the list may be the
284 # keywords [G] for Windows GUI app, [C] for Console app, [X] for
285 # X/GTK Unix app, [U] for command-line Unix app.
286
287 putty    : [G] GUITERM NONSSH WINSSH W_BE_ALL WINMISC winx11 putty.res LIBS
288 puttytel : [G] GUITERM NONSSH W_BE_NOSSH WINMISC puttytel.res nogss LIBS
289 plink    : [C] winplink wincons NONSSH WINSSH W_BE_ALL logging WINMISC
290          + winx11 plink.res winnojmp noterm LIBS
291 pscp     : [C] pscp winsftp wincons WINSSH BE_SSH SFTP wildcard WINMISC
292          + pscp.res winnojmp LIBS
293 psftp    : [C] psftp winsftp wincons WINSSH BE_SSH SFTP wildcard WINMISC
294          + psftp.res winnojmp LIBS
295
296 pageant  : [G] winpgnt pageant sshrsa sshpubk sshdes sshbn sshmd5 version
297          + tree234 misc sshaes sshsha winsecur winpgntc aqsync sshdss sshsh256
298          + sshsh512 winutils sshecc winmisc winhelp conf pageant.res LIBS
299
300 puttygen : [G] winpgen sshrsag sshdssg sshprime sshdes sshbn sshmd5 version
301          + sshrand winnoise sshsha winstore misc winctrls sshrsa sshdss winmisc
302          + sshpubk sshaes sshsh256 sshsh512 IMPORT winutils puttygen.res
303          + tree234 notiming winhelp winnojmp conf LIBS wintime sshecc
304          + sshecdsag winsecur
305
306 pterm    : [X] GTKTERM uxmisc misc ldisc settings uxpty uxsel BE_NONE uxstore
307          + uxsignal CHARSET cmdline uxpterm version time xpmpterm xpmptcfg
308          + nogss gtkmain
309 putty    : [X] GTKTERM uxmisc misc ldisc settings uxsel U_BE_ALL uxstore
310          + uxsignal CHARSET uxputty NONSSH UXSSH UXMISC ux_x11 xpmputty
311          + xpmpucfg gtkmain
312 puttytel : [X] GTKTERM uxmisc misc ldisc settings uxsel U_BE_NOSSH
313          + uxstore uxsignal CHARSET uxputty NONSSH UXMISC xpmputty xpmpucfg
314          + nogss gtkmain
315
316 plink    : [U] uxplink uxcons NONSSH UXSSH U_BE_ALL logging UXMISC uxsignal
317          + ux_x11 noterm
318
319 PUTTYGEN_UNIX = sshrsag sshdssg sshprime sshdes sshbn sshmd5 version
320          + sshrand uxnoise sshsha misc sshrsa sshdss uxcons uxstore uxmisc
321          + sshpubk sshaes sshsh256 sshsh512 IMPORT puttygen.res time tree234
322          + uxgen notiming conf sshecc sshecdsag
323 puttygen : [U] cmdgen PUTTYGEN_UNIX
324 cgtest   : [UT] cgtest PUTTYGEN_UNIX
325
326 pscp     : [U] pscp uxsftp uxcons UXSSH BE_SSH SFTP wildcard UXMISC
327 psftp    : [U] psftp uxsftp uxcons UXSSH BE_SSH SFTP wildcard UXMISC
328
329 pageant  : [X] uxpgnt uxagentc aqsync pageant sshrsa sshpubk sshdes sshbn
330          + sshmd5 version tree234 misc sshaes sshsha sshdss sshsh256 sshsh512
331          + sshecc conf uxsignal nocproxy nogss be_none x11fwd ux_x11 uxcons
332          + gtkask gtkmisc UXMISC
333
334 ptermapp : [XT] GTKTERM uxmisc misc ldisc settings uxpty uxsel BE_NONE uxstore
335          + uxsignal CHARSET cmdline uxpterm version time xpmpterm xpmptcfg
336          + nogss gtkapp
337 puttyapp : [XT] GTKTERM uxmisc misc ldisc settings uxsel U_BE_ALL uxstore
338          + uxsignal CHARSET uxputty NONSSH UXSSH UXMISC ux_x11 xpmputty
339          + xpmpucfg gtkapp
340 osxlaunch : [UT] osxlaunch
341
342 fuzzterm : [UT] UXTERM CHARSET misc version uxmisc uxucs fuzzterm time settings
343          + uxstore be_none
344 testbn   : [UT] testbn sshbn misc version conf tree234 uxmisc
345 testbn   : [C] testbn sshbn misc version conf tree234 winmisc LIBS
346
347 # ----------------------------------------------------------------------
348 # On Windows, provide a means of removing local test binaries that we
349 # aren't going to actually ship. (I prefer this to not building them
350 # in the first place, so that we find out about build breakage early.)
351 !begin vc
352 cleantestprogs:
353         -del $(BUILDDIR)testbn.exe
354 !end