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