1 # Visual C++ Makefile for PuTTY.
3 # Use `nmake' to build.
8 # Extra options you can set:
11 # Enables a hack that tunnels through some firewall proxies.
13 # - VER=/DSNAPSHOT=1999-01-25
14 # Generates executables whose About box report them as being a
15 # development snapshot.
17 # - VER=/DRELEASE=0.43
18 # Generates executables whose About box report them as being a
21 # - COMPAT=/DAUTO_WINSOCK
22 # Causes PuTTY to assume that <windows.h> includes its own WinSock
23 # header file, so that it won't try to include <winsock.h>.
25 # - COMPAT=/DWINSOCK_TWO
26 # Causes the PuTTY utilities to include <winsock2.h> instead of
27 # <winsock.h>, except Plink which _needs_ WinSock 2 so it already
31 # Uses ASCII rather than Unicode to specify the tab control in
32 # the resource file. Probably most useful when compiling with
33 # Cygnus/mingw32, whose resource compiler may have less of a
38 CFLAGS
= /nologo
/W3
/YX
/O2
/Yd
/D_WINDOWS
/DDEBUG
/ML
/Fd
42 # CFLAGS = /nologo /W3 /YX /O2 /Yd /D_WINDOWS /DDEBUG /MD /Fd
44 # Disable debug and incremental linking
45 LFLAGS
= /incremental
:no
48 cl
$(COMPAT
) $(FWHACK
) $(CFLAGS
) /c
$*.c
53 ##-- objects putty puttytel
54 GOBJS1
= window.
$(OBJ
) windlg.
$(OBJ
) winctrls.
$(OBJ
) terminal.
$(OBJ
)
55 GOBJS2
= xlat.
$(OBJ
) sizetip.
$(OBJ
)
56 ##-- objects putty puttytel plink
57 LOBJS1
= telnet.
$(OBJ
) raw.
$(OBJ
) ldisc.
$(OBJ
)
58 ##-- objects putty plink
61 TOBJS
= be_nossh.
$(OBJ
)
65 SOBJS
= scp.
$(OBJ
) be_none.
$(OBJ
)
66 ##-- objects putty puttytel pscp plink
67 MOBJS
= misc.
$(OBJ
) version.
$(OBJ
) winstore.
$(OBJ
) settings.
$(OBJ
)
68 ##-- objects putty pscp plink
69 OBJS1
= sshcrc.
$(OBJ
) sshdes.
$(OBJ
) sshmd5.
$(OBJ
) sshrsa.
$(OBJ
) sshrand.
$(OBJ
)
70 OBJS2
= sshsha.
$(OBJ
) sshblowf.
$(OBJ
) noise.
$(OBJ
) sshdh.
$(OBJ
) sshdss.
$(OBJ
)
71 OBJS3
= sshbn.
$(OBJ
) sshpubk.
$(OBJ
) ssh.
$(OBJ
) pageantc.
$(OBJ
) tree234.
$(OBJ
)
73 PAGE1
= pageant.
$(OBJ
) sshrsa.
$(OBJ
) sshpubk.
$(OBJ
) sshdes.
$(OBJ
) sshbn.
$(OBJ
)
74 PAGE2
= sshmd5.
$(OBJ
) version.
$(OBJ
) tree234.
$(OBJ
)
76 GEN1
= puttygen.
$(OBJ
) sshrsag.
$(OBJ
) sshprime.
$(OBJ
) sshdes.
$(OBJ
)
77 GEN2
= sshbn.
$(OBJ
) sshmd5.
$(OBJ
) version.
$(OBJ
) sshrand.
$(OBJ
) noise.
$(OBJ
)
78 GEN3
= sshsha.
$(OBJ
) winstore.
$(OBJ
) misc.
$(OBJ
) winctrls.
$(OBJ
)
79 GEN4
= sshrsa.
$(OBJ
) sshpubk.
$(OBJ
)
80 ##-- resources putty puttytel
81 PRESRC
= win_res.
$(RES
)
82 ##-- resources pageant
83 PAGERC
= pageant.
$(RES
)
84 ##-- resources puttygen
85 GENRC
= puttygen.
$(RES
)
102 LIBS1
= advapi32.lib user32.lib gdi32.lib
103 LIBS2
= comctl32.lib comdlg32.lib
108 all: putty.exe puttytel.exe pscp.exe plink.exe pageant.exe puttygen.exe
110 putty.exe
: $(GOBJS1
) $(GOBJS2
) $(LOBJS1
) $(POBJS
) $(MOBJS
) $(OBJS1
) $(OBJS2
) $(OBJS3
) $(PRESRC
) putty.rsp
111 link
$(LFLAGS
) -out
:putty.exe @putty.rsp
113 puttytel.exe
: $(GOBJS1
) $(GOBJS2
) $(LOBJS1
) $(TOBJS
) $(MOBJS
) $(PRESRC
) puttytel.rsp
114 link
$(LFLAGS
) -out
:puttytel.exe @puttytel.rsp
116 pageant.exe
: $(PAGE1
) $(PAGE2
) $(PAGERC
) pageant.rsp
117 link
$(LFLAGS
) -out
:pageant.exe @pageant.rsp
119 puttygen.exe
: $(GEN1
) $(GEN2
) $(GEN3
) $(GEN4
) $(GENRC
) puttygen.rsp
120 link
$(LFLAGS
) -out
:puttygen.exe @puttygen.rsp
122 pscp.exe
: $(SOBJS
) $(MOBJS
) $(OBJS1
) $(OBJS2
) $(OBJS3
) $(SRESRC
) pscp.rsp
123 link
$(LFLAGS
) -out
:pscp.exe @pscp.rsp
125 plink.exe
: $(LOBJS1
) $(POBJS
) $(PLOBJS
) $(MOBJS
) $(OBJS1
) $(OBJS2
) $(OBJS3
) $(LRESRC
) plink.rsp
126 link
$(LFLAGS
) -out
:plink.exe @plink.rsp
129 echo
/nologo
/subsystem
:windows
> putty.rsp
130 echo
$(GOBJS1
) >> putty.rsp
131 echo
$(GOBJS2
) >> putty.rsp
132 echo
$(LOBJS1
) >> putty.rsp
133 echo
$(POBJS
) >> putty.rsp
134 echo
$(MOBJS
) >> putty.rsp
135 echo
$(OBJS1
) >> putty.rsp
136 echo
$(OBJS2
) >> putty.rsp
137 echo
$(OBJS3
) >> putty.rsp
138 echo
$(PRESRC
) >> putty.rsp
139 echo
$(LIBS1
) >> putty.rsp
140 echo
$(LIBS2
) >> putty.rsp
141 echo
$(SOCK1
) >> putty.rsp
143 puttytel.rsp
: makefile
144 echo
/nologo
/subsystem
:windows
> puttytel.rsp
145 echo
$(GOBJS1
) >> puttytel.rsp
146 echo
$(GOBJS2
) >> puttytel.rsp
147 echo
$(LOBJS1
) >> puttytel.rsp
148 echo
$(TOBJS
) >> puttytel.rsp
149 echo
$(MOBJS
) >> puttytel.rsp
150 echo
$(PRESRC
) >> puttytel.rsp
151 echo
$(LIBS1
) >> puttytel.rsp
152 echo
$(LIBS2
) >> puttytel.rsp
153 echo
$(SOCK1
) >> puttytel.rsp
155 pageant.rsp
: makefile
156 echo
/nologo
/subsystem
:windows
> pageant.rsp
157 echo
$(PAGE1
) >> pageant.rsp
158 echo
$(PAGE2
) >> pageant.rsp
159 echo
$(PAGERC
) >> pageant.rsp
160 echo
$(LIBS1
) >> pageant.rsp
161 echo
$(LIBS2
) >> pageant.rsp
162 echo
$(LIBS3
) >> pageant.rsp
164 puttygen.rsp
: makefile
165 echo
/nologo
/subsystem
:windows
> puttygen.rsp
166 echo
$(GEN1
) >> puttygen.rsp
167 echo
$(GEN2
) >> puttygen.rsp
168 echo
$(GEN3
) >> puttygen.rsp
169 echo
$(GEN4
) >> puttygen.rsp
170 echo
$(GENRC
) >> puttygen.rsp
171 echo
$(LIBS1
) >> puttygen.rsp
172 echo
$(LIBS2
) >> puttygen.rsp
173 echo
$(LIBS3
) >> puttygen.rsp
176 echo
/nologo
/subsystem
:console
> pscp.rsp
177 echo
$(SOBJS
) >> pscp.rsp
178 echo
$(MOBJS
) >> pscp.rsp
179 echo
$(OBJS1
) >> pscp.rsp
180 echo
$(OBJS2
) >> pscp.rsp
181 echo
$(OBJS3
) >> pscp.rsp
182 echo
$(SRESRC
) >> pscp.rsp
183 echo
$(LIBS1
) >> pscp.rsp
184 echo
$(LIBS2
) >> pscp.rsp
185 echo
$(SOCK1
) >> pscp.rsp
188 echo
/nologo
/subsystem
:console
> plink.rsp
189 echo
$(LOBJS1
) >> plink.rsp
190 echo
$(POBJS
) >> plink.rsp
191 echo
$(PLOBJS
) >> plink.rsp
192 echo
$(MOBJS
) >> plink.rsp
193 echo
$(OBJS1
) >> plink.rsp
194 echo
$(OBJS2
) >> plink.rsp
195 echo
$(OBJS3
) >> plink.rsp
196 echo
$(LRESRC
) >> plink.rsp
197 echo
$(LIBS1
) >> plink.rsp
198 echo
$(LIBS2
) >> plink.rsp
199 echo
$(SOCK2
) >> plink.rsp
202 window.
$(OBJ
): window.c putty.h win_res.h storage.h winstuff.h
203 windlg.
$(OBJ
): windlg.c putty.h ssh.h win_res.h winstuff.h
204 winctrls.
$(OBJ
): winctrls.c winstuff.h winstuff.h
205 settings.
$(OBJ
): settings.c putty.h storage.h
206 winstore.
$(OBJ
): winstore.c putty.h storage.h
207 terminal.
$(OBJ
): terminal.c putty.h
208 sizetip.
$(OBJ
): sizetip.c putty.h winstuff.h
209 telnet.
$(OBJ
): telnet.c putty.h
210 raw.
$(OBJ
): raw.c putty.h
211 xlat.
$(OBJ
): xlat.c putty.h
212 ldisc.
$(OBJ
): ldisc.c putty.h
213 misc.
$(OBJ
): misc.c putty.h
214 noise.
$(OBJ
): noise.c putty.h ssh.h storage.h
215 ssh.
$(OBJ
): ssh.c ssh.h putty.h tree234.h
216 sshcrc.
$(OBJ
): sshcrc.c ssh.h
217 sshdes.
$(OBJ
): sshdes.c ssh.h
218 sshmd5.
$(OBJ
): sshmd5.c ssh.h
219 sshrsa.
$(OBJ
): sshrsa.c ssh.h
220 sshsha.
$(OBJ
): sshsha.c ssh.h
221 sshrand.
$(OBJ
): sshrand.c ssh.h
222 sshblowf.
$(OBJ
): sshblowf.c ssh.h
223 sshdh.
$(OBJ
): sshdh.c ssh.h
224 sshdss.
$(OBJ
): sshdss.c ssh.h
225 sshbn.
$(OBJ
): sshbn.c ssh.h
226 sshpubk.
$(OBJ
): sshpubk.c ssh.h
227 scp.
$(OBJ
): scp.c putty.h winstuff.h
228 version.
$(OBJ
): version.c
229 be_all.
$(OBJ
): be_all.c
230 be_nossh.
$(OBJ
): be_nossh.c
231 be_none.
$(OBJ
): be_none.c
232 plink.
$(OBJ
): plink.c putty.h winstuff.h
233 pageant.
$(OBJ
): pageant.c ssh.h tree234.h
234 tree234.
$(OBJ
): tree234.c tree234.h
237 # Hack to force version.obj to be rebuilt always
238 version.obj
: versionpseudotarget
239 @echo
(built version.obj
)
241 cl
$(FWHACK
) $(VER
) $(CFLAGS
) /c version.c
244 win_res.
$(RES
): win_res.rc win_res.h putty.ico
247 rc
$(FWHACK
) $(RCFL
) -r
-DWIN32
-D_WIN32
-DWINVER
=0x0400 win_res.rc
250 scp.
$(RES
): scp.rc scp.ico
253 rc
$(FWHACK
) $(RCFL
) -r
-DWIN32
-D_WIN32
-DWINVER
=0x0400 scp.rc
256 pageant.
$(RES
): pageant.rc pageant.ico pageants.ico
259 rc
$(FWHACK
) $(RCFL
) -r
-DWIN32
-D_WIN32
-DWINVER
=0x0400 pageant.rc
262 puttygen.
$(RES
): puttygen.rc puttygen.ico
265 rc
$(FWHACK
) $(RCFL
) -r
-DWIN32
-D_WIN32
-DWINVER
=0x0400 puttygen.rc