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