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