Make mkfiles.pl less tied to PuTTY in particular, by inventing new
[u/mdw/putty] / Recipe
CommitLineData
7603011f 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
e35fb54b 9# ------------------------------------------------------------
10# Top-level configuration.
11
12# Overall project name.
13!name putty
14# Locations and types of output Makefiles.
15!makefile vc Makefile.vc
16!makefile vcproj MSVC
17!makefile cygwin Makefile.cyg
18!makefile borland Makefile.bor
19!makefile lcc Makefile.lcc
20!makefile gtk unix/Makefile.gtk
21!makefile mpw mac/Makefile.mpw
22
7603011f 23# Help text added to the top of each Makefile, with /D converted
24# into -D as appropriate for the particular Makefile.
25
26!begin help
27#
28# Extra options you can set:
29#
30# - FWHACK=/DFWHACK
31# Enables a hack that tunnels through some firewall proxies.
32#
33# - VER=/DSNAPSHOT=1999-01-25
34# Generates executables whose About box report them as being a
35# development snapshot.
36#
37# - VER=/DRELEASE=0.43
38# Generates executables whose About box report them as being a
39# release version.
40#
41# - COMPAT=/DAUTO_WINSOCK
42# Causes PuTTY to assume that <windows.h> includes its own WinSock
43# header file, so that it won't try to include <winsock.h>.
44#
45# - COMPAT=/DWINSOCK_TWO
46# Causes the PuTTY utilities to include <winsock2.h> instead of
47# <winsock.h>, except Plink which _needs_ WinSock 2 so it already
48# does this.
49#
50# - COMPAT=/DNO_SECURITY
51# Disables Pageant's use of <aclapi.h>, which is not available
7c521ac9 52# with some development environments (such as older versions of
53# the Cygwin/mingw GNU toolchain). This means that Pageant
7603011f 54# won't care about the local user ID of processes accessing it; a
55# version of Pageant built with this option will therefore refuse
56# to run under NT-series OSes on security grounds (although it
57# will run fine on Win95-series OSes where there is no access
58# control anyway).
59#
7603011f 60# - COMPAT=/DNO_MULTIMON
61# Disables PuTTY's use of <multimon.h>, which is not available
62# with some development environments. This means that PuTTY's
63# full-screen mode (configurable to work on Alt-Enter) will
64# not behave usefully in a multi-monitor environment.
65#
66# Note that this definition is always enabled in the Cygwin
67# build, since at the time of writing this <multimon.h> is
68# known not to be available in Cygwin.
69#
70# - COMPAT=/DMSVC4
71# - RCFL=/DMSVC4
72# Makes a couple of minor changes so that PuTTY compiles using
73# MSVC 4. You will also need /DNO_SECURITY and /DNO_MULTIMON.
74#
75# - RCFL=/DASCIICTLS
76# Uses ASCII rather than Unicode to specify the tab control in
77# the resource file. Probably most useful when compiling with
78# Cygnus/mingw32, whose resource compiler may have less of a
79# problem with it.
80#
4044fc45 81# - XFLAGS=/DTELNET_DEFAULT
82# Causes PuTTY to default to the Telnet protocol (in the absence
83# of Default Settings and so on to the contrary). Normally PuTTY
84# will default to SSH.
85#
7603011f 86# - XFLAGS=/DDEBUG
87# Causes PuTTY to enable internal debugging.
88#
89# - XFLAGS=/DMALLOC_LOG
90# Causes PuTTY to emit a file called putty_mem.log, logging every
91# memory allocation and free, so you can track memory leaks.
92#
93# - XFLAGS=/DMINEFIELD
94# Causes PuTTY to use a custom memory allocator, similar in
95# concept to Electric Fence, in place of regular malloc(). Wastes
96# huge amounts of RAM, but should cause heap-corruption bugs to
97# show up as GPFs at the point of failure rather than appearing
98# later on as second-level damage.
99#
100!end
101
e35fb54b 102# ------------------------------------------------------------
103# Additional text added verbatim to each individual Makefile.
104
105# Hack to force version.o to be rebuilt always.
106!begin vc
107version.obj: *.c *.h *.rc
108 cl $(FWHACK) $(VER) $(CFLAGS) /c version.c
109!end
110!begin cygwin
111version.o: FORCE;
112FORCE:
113 $(CC) $(COMPAT) $(FWHACK) $(XFLAGS) $(CFLAGS) $(VER) -c version.c
114!end
115!begin borland
116version.obj: FORCE
117FORCE:
118 bcc32 $(FWHACK) $(VER) $(CFLAGS) /c version.obj
119!end
120!begin lcc
121version.o: FORCE
122FORCE:
123 lcc $(FWHACK) $(VER) $(CFLAGS) /c version.c
124!end
125# For Unix, we also need the gross MD5 hack that causes automatic
126# version number selection in release source archives.
127!begin gtk
128version.o: FORCE;
129FORCE:
130 if test -z "$(VER)" && (cd ..; md5sum -c manifest); then \
131 $(CC) $(COMPAT) $(FWHACK) $(XFLAGS) $(CFLAGS) `cat ../version.def` -c ../version.c; \
132 else \
133 $(CC) $(COMPAT) $(FWHACK) $(XFLAGS) $(CFLAGS) $(VER) -c ../version.c; \
134 fi
135!end
136
137# `make install' target for Unix.
138!begin gtk
139install:
140 $(INSTALL_PROGRAM) -m 755 plink $(DESTDIR)$(bindir)/plink
141 $(INSTALL_PROGRAM) -m 755 pscp $(DESTDIR)$(bindir)/pscp
142 $(INSTALL_PROGRAM) -m 755 psftp $(DESTDIR)$(bindir)/psftp
143 $(INSTALL_PROGRAM) -m 755 pterm $(DESTDIR)$(bindir)/pterm
144 $(INSTALL_PROGRAM) -m 755 putty $(DESTDIR)$(bindir)/putty
145 $(INSTALL_PROGRAM) -m 755 puttygen $(DESTDIR)$(bindir)/puttygen
146 $(INSTALL_PROGRAM) -m 755 puttytel $(DESTDIR)$(bindir)/puttytel
147 $(INSTALL_DATA) -m 644 ../doc/plink.1 $(DESTDIR)$(man1dir)/plink.1
148 $(INSTALL_DATA) -m 644 ../doc/pscp.1 $(DESTDIR)$(man1dir)/pscp.1
149 $(INSTALL_DATA) -m 644 ../doc/psftp.1 $(DESTDIR)$(man1dir)/psftp.1
150 $(INSTALL_DATA) -m 644 ../doc/pterm.1 $(DESTDIR)$(man1dir)/pterm.1
151 $(INSTALL_DATA) -m 644 ../doc/putty.1 $(DESTDIR)$(man1dir)/putty.1
152 $(INSTALL_DATA) -m 644 ../doc/puttygen.1 $(DESTDIR)$(man1dir)/puttygen.1
153 $(INSTALL_DATA) -m 644 ../doc/puttytel.1 $(DESTDIR)$(man1dir)/puttytel.1
154
155install-strip:
156 $(MAKE) install INSTALL_PROGRAM="$(INSTALL_PROGRAM) -s"
157!end
158
159# ------------------------------------------------------------
7603011f 160# Definitions of object groups. A group name, followed by an =,
161# followed by any number of objects or other already-defined group
162# names. A line beginning `+' is assumed to continue the previous
163# line.
164
165# GUI front end and terminal emulator (putty, puttytel).
5def7522 166GUITERM = window windlg winctrls terminal sizetip wcwidth unicode ldiscucs
fe8abbf4 167 + logging printing winutils dialog config wincfg tree234
7603011f 168
f5dd8adb 169# Same thing on Unix.
170UXTERM = pterm config uxcfg dialog gtkdlg gtkcols gtkpanel tree234
171 + terminal wcwidth uxucs ldiscucs logging uxprint xkeysym
1d009ae7 172
7603011f 173# Non-SSH back ends (putty, puttytel, plink).
174NONSSH = telnet raw rlogin ldisc
175
176# SSH back end (putty, plink, pscp, psftp).
c5e438ec 177SSH = ssh sshcrc sshdes sshmd5 sshrsa sshrand sshsha sshblowf
178 + sshdh sshcrcda sshpubk sshzlib sshdss x11fwd portfwd
831301f6 179 + sshaes sshsh512 sshbn wildcard
c5e438ec 180WINSSH = SSH noise pageantc
181UXSSH = SSH uxnoise uxagentc
0c4b7799 182MACSSH = SSH macnoise
7603011f 183
184# SFTP implementation (pscp, psftp).
185SFTP = sftp int64 logging
186
187# Miscellaneous objects appearing in all the network utilities (not
188# Pageant or PuTTYgen).
c5e438ec 189WINMISC = misc version winstore settings tree234 winnet proxy cmdline
0f0a2507 190 + windefs winmisc pproxy
0ff9ea38 191UXMISC = misc version uxstore settings tree234 uxsel uxnet proxy cmdline
0f0a2507 192 + uxmisc uxproxy
27a3458f 193MACMISC = misc version macstore settings tree234 macnet mtcpnet otnet proxy
0f0a2507 194 + macmisc macabout pproxy
7603011f 195
2dc6356a 196# Character set library, for use in pterm.
d4413bd2 197CHARSET = sbcsdat slookup sbcs utf8 toucs fromucs xenc mimeenc macenc localenc
2dc6356a 198
7440fd44 199# Standard libraries.
7603011f 200LIBS = advapi32.lib user32.lib gdi32.lib comctl32.lib comdlg32.lib
201 + shell32.lib winmm.lib imm32.lib winspool.lib
7603011f 202
e35fb54b 203# ------------------------------------------------------------
7603011f 204# Definitions of actual programs. The program name, followed by a
205# colon, followed by a list of objects. Also in the list may be the
f7f27309 206# keywords [G] for Windows GUI app, [C] for Console app, [X] for
dddf640d 207# X/GTK Unix app, [U] for command-line Unix app, [M] for Macintosh app.
7603011f 208
7440fd44 209putty : [G] GUITERM NONSSH WINSSH be_all WINMISC win_res.res LIBS
210puttytel : [G] GUITERM NONSSH be_nossh WINMISC win_res.res LIBS
c5e438ec 211plink : [C] plink console NONSSH WINSSH be_all logging WINMISC
7440fd44 212 + plink.res LIBS
799dfcfa 213pscp : [C] scp winsftp console WINSSH be_none SFTP wildcard WINMISC
7440fd44 214 + scp.res LIBS
215psftp : [C] psftp winsftp console WINSSH be_none SFTP WINMISC scp.res LIBS
7603011f 216
217pageant : [G] pageant sshrsa sshpubk sshdes sshbn sshmd5 version tree234
9a30e26b 218 + misc sshaes sshsha pageantc sshdss sshsh512 winutils winmisc
b492c4d7 219 + pageant.res LIBS
7603011f 220
221puttygen : [G] puttygen sshrsag sshdssg sshprime sshdes sshbn sshmd5 version
9a30e26b 222 + sshrand noise sshsha winstore misc winctrls sshrsa sshdss winmisc
fe8abbf4 223 + sshpubk sshaes sshsh512 import winutils puttygen.res tree234 LIBS
f7f27309 224
f5dd8adb 225pterm : [X] UXTERM uxmisc misc ldisc settings pty uxsel be_none uxstore
226 + signal CHARSET cmdline ptermm version
227putty : [X] UXTERM uxmisc misc ldisc settings pty uxsel be_all uxstore
228 + signal CHARSET uxputty NONSSH UXSSH UXMISC ux_x11
229puttytel : [X] UXTERM uxmisc misc ldisc settings pty uxsel be_nossh uxstore
230 + signal CHARSET uxputty NONSSH UXMISC
c5e438ec 231
e0e7dff8 232plink : [U] uxplink uxcons NONSSH UXSSH be_all logging UXMISC signal ux_x11
cd6ca416 233
47a6b94c 234puttygen : [U] cmdgen sshrsag sshdssg sshprime sshdes sshbn sshmd5 version
235 + sshrand uxnoise sshsha misc sshrsa sshdss uxcons uxstore uxmisc
236 + sshpubk sshaes sshsh512 import puttygen.res tree234 uxgen
237
799dfcfa 238pscp : [U] scp uxsftp uxcons UXSSH be_none SFTP wildcard UXMISC
b51259f6 239psftp : [U] psftp uxsftp uxcons UXSSH be_none SFTP UXMISC
d6cc41e6 240
7dcd1f87 241PuTTY : [M] terminal wcwidth ldiscucs logging be_all mac macdlg macevlog
0c4b7799 242 + macterm macucs mac_res.rsrc testback NONSSH MACSSH MACMISC CHARSET
8a7e67ec 243 + stricmp vsnprint dialog config macctrls
7dcd1f87 244PuTTYtel : [M] terminal wcwidth ldiscucs logging be_nossh mac macdlg macevlog
8485cc75 245 + macterm macucs mac_res.rsrc testback NONSSH MACMISC CHARSET
8a7e67ec 246 + stricmp vsnprint dialog config macctrls
06c24bc0 247PuTTYgen : [M] macpgen sshrsag sshdssg sshprime sshdes sshbn sshmd5 version
248 + sshrand macnoise sshsha macstore misc sshrsa sshdss macmisc sshpubk
217b88d1 249 + sshaes sshsh512 import macpgen.rsrc macpgkey macabout