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=/DWIN32S_COMPAT
22 # Generates a binary that works (minimally) with Win32s.
25 # Uses ASCII rather than Unicode to specify the tab control in
26 # the resource file. Probably most useful when compiling with
27 # Cygnus/mingw32, whose resource compiler may have less of a
32 CFLAGS
= /nologo
/W3
/YX
/O2
/Yd
/D_WINDOWS
/DDEBUG
/ML
/Fd
36 # CFLAGS = /nologo /W3 /YX /O2 /Yd /D_WINDOWS /DDEBUG /MD /Fd
38 # Disable debug and incremental linking
39 LFLAGS
= /incremental
:no
42 cl
$(COMPAT
) $(FWHACK
) $(CFLAGS
) /c
$*.c
47 ##-- objects putty puttytel
48 GOBJS1
= window.
$(OBJ
) windlg.
$(OBJ
) terminal.
$(OBJ
)
49 GOBJS2
= xlat.
$(OBJ
) sizetip.
$(OBJ
)
50 ##-- objects putty puttytel plink
51 LOBJS1
= telnet.
$(OBJ
) raw.
$(OBJ
) ldisc.
$(OBJ
)
52 ##-- objects putty plink
55 TOBJS
= be_nossh.
$(OBJ
)
57 PLOBJS
= plink.
$(OBJ
) windlg.
$(OBJ
)
59 SOBJS
= scp.
$(OBJ
) windlg.
$(OBJ
) be_none.
$(OBJ
)
60 ##-- objects putty puttytel pscp plink
61 MOBJS
= misc.
$(OBJ
) version.
$(OBJ
)
62 ##-- objects putty pscp plink
63 OBJS1
= sshcrc.
$(OBJ
) sshdes.
$(OBJ
) sshmd5.
$(OBJ
) sshrsa.
$(OBJ
) sshrand.
$(OBJ
)
64 OBJS2
= sshsha.
$(OBJ
) sshblowf.
$(OBJ
) noise.
$(OBJ
) sshdh.
$(OBJ
) sshdss.
$(OBJ
)
65 OBJS3
= sshbn.
$(OBJ
) sshpubk.
$(OBJ
) ssh.
$(OBJ
) pageantc.
$(OBJ
) tree234.
$(OBJ
)
67 PAGE1
= pageant.
$(OBJ
) sshrsa.
$(OBJ
) sshpubk.
$(OBJ
) sshdes.
$(OBJ
) sshbn.
$(OBJ
)
68 PAGE2
= sshmd5.
$(OBJ
) version.
$(OBJ
) tree234.
$(OBJ
)
70 PRESRC
= win_res.
$(RES
)
71 ##-- resources puttytel
72 TRESRC
= nosshres.
$(RES
)
73 ##-- resources pageant
74 PAGERC
= pageant.
$(RES
)
90 LIBS1
= advapi32.lib user32.lib gdi32.lib
91 LIBS2
= comctl32.lib comdlg32.lib
96 all: putty.exe puttytel.exe pscp.exe plink.exe pageant.exe
98 putty.exe
: $(GOBJS1
) $(GOBJS2
) $(LOBJS1
) $(POBJS
) $(MOBJS
) $(OBJS1
) $(OBJS2
) $(OBJS3
) $(PRESRC
) putty.rsp
99 link
$(LFLAGS
) -out
:putty.exe @putty.rsp
101 puttytel.exe
: $(GOBJS1
) $(GOBJS2
) $(LOBJS1
) $(TOBJS
) $(MOBJS
) $(TRESRC
) puttytel.rsp
102 link
$(LFLAGS
) -out
:puttytel.exe @puttytel.rsp
104 pageant.exe
: $(PAGE1
) $(PAGE2
) $(PAGERC
) pageant.rsp
105 link
$(LFLAGS
) -out
:pageant.exe @pageant.rsp
107 pscp.exe
: $(SOBJS
) $(MOBJS
) $(OBJS1
) $(OBJS2
) $(OBJS3
) $(SRESRC
) pscp.rsp
108 link
$(LFLAGS
) -out
:pscp.exe @pscp.rsp
110 plink.exe
: $(LOBJS1
) $(POBJS
) $(PLOBJS
) $(MOBJS
) $(OBJS1
) $(OBJS2
) $(OBJS3
) $(LRESRC
) plink.rsp
111 link
$(LFLAGS
) -out
:plink.exe @plink.rsp
114 echo
/nologo
/subsystem
:windows
> putty.rsp
115 echo
$(GOBJS1
) >> putty.rsp
116 echo
$(GOBJS2
) >> putty.rsp
117 echo
$(LOBJS1
) >> putty.rsp
118 echo
$(POBJS
) >> putty.rsp
119 echo
$(MOBJS
) >> putty.rsp
120 echo
$(OBJS1
) >> putty.rsp
121 echo
$(OBJS2
) >> putty.rsp
122 echo
$(OBJS3
) >> putty.rsp
123 echo
$(PRESRC
) >> putty.rsp
124 echo
$(LIBS1
) >> putty.rsp
125 echo
$(LIBS2
) >> putty.rsp
126 echo
$(SOCK1
) >> putty.rsp
128 puttytel.rsp
: makefile
129 echo
/nologo
/subsystem
:windows
> puttytel.rsp
130 echo
$(GOBJS1
) >> puttytel.rsp
131 echo
$(GOBJS2
) >> puttytel.rsp
132 echo
$(LOBJS1
) >> puttytel.rsp
133 echo
$(TOBJS
) >> puttytel.rsp
134 echo
$(MOBJS
) >> puttytel.rsp
135 echo
$(TRESRC
) >> puttytel.rsp
136 echo
$(LIBS1
) >> puttytel.rsp
137 echo
$(LIBS2
) >> puttytel.rsp
138 echo
$(SOCK1
) >> puttytel.rsp
140 pageant.rsp
: makefile
141 echo
/nologo
/subsystem
:windows
> pageant.rsp
142 echo
$(PAGE1
) >> pageant.rsp
143 echo
$(PAGE2
) >> pageant.rsp
144 echo
$(PAGERC
) >> pageant.rsp
145 echo
$(LIBS1
) >> pageant.rsp
146 echo
$(LIBS2
) >> pageant.rsp
147 echo
$(LIBS3
) >> pageant.rsp
150 echo
/nologo
/subsystem
:console
> pscp.rsp
151 echo
$(SOBJS
) >> pscp.rsp
152 echo
$(MOBJS
) >> pscp.rsp
153 echo
$(OBJS1
) >> pscp.rsp
154 echo
$(OBJS2
) >> pscp.rsp
155 echo
$(OBJS3
) >> pscp.rsp
156 echo
$(SRESRC
) >> pscp.rsp
157 echo
$(LIBS1
) >> pscp.rsp
158 echo
$(LIBS2
) >> pscp.rsp
159 echo
$(SOCK1
) >> pscp.rsp
162 echo
/nologo
/subsystem
:console
> plink.rsp
163 echo
$(LOBJS1
) >> plink.rsp
164 echo
$(POBJS
) >> plink.rsp
165 echo
$(PLOBJS
) >> plink.rsp
166 echo
$(MOBJS
) >> plink.rsp
167 echo
$(OBJS1
) >> plink.rsp
168 echo
$(OBJS2
) >> plink.rsp
169 echo
$(OBJS3
) >> plink.rsp
170 echo
$(LRESRC
) >> plink.rsp
171 echo
$(LIBS1
) >> plink.rsp
172 echo
$(LIBS2
) >> plink.rsp
173 echo
$(SOCK2
) >> plink.rsp
176 window.
$(OBJ
): window.c putty.h win_res.h
177 windlg.
$(OBJ
): windlg.c putty.h ssh.h win_res.h
178 terminal.
$(OBJ
): terminal.c putty.h
179 sizetip.
$(OBJ
): sizetip.c putty.h
180 telnet.
$(OBJ
): telnet.c putty.h
181 raw.
$(OBJ
): raw.c putty.h
182 xlat.
$(OBJ
): xlat.c putty.h
183 ldisc.
$(OBJ
): ldisc.c putty.h
184 misc.
$(OBJ
): misc.c putty.h
185 noise.
$(OBJ
): noise.c putty.h ssh.h
186 ssh.
$(OBJ
): ssh.c ssh.h putty.h tree234.h
187 sshcrc.
$(OBJ
): sshcrc.c ssh.h
188 sshdes.
$(OBJ
): sshdes.c ssh.h
189 sshmd5.
$(OBJ
): sshmd5.c ssh.h
190 sshrsa.
$(OBJ
): sshrsa.c ssh.h
191 sshsha.
$(OBJ
): sshsha.c ssh.h
192 sshrand.
$(OBJ
): sshrand.c ssh.h
193 sshblowf.
$(OBJ
): sshblowf.c ssh.h
194 sshdh.
$(OBJ
): sshdh.c ssh.h
195 sshdss.
$(OBJ
): sshdss.c ssh.h
196 sshbn.
$(OBJ
): sshbn.c ssh.h
197 sshpubk.
$(OBJ
): sshpubk.c ssh.h
198 scp.
$(OBJ
): scp.c putty.h scp.h
199 version.
$(OBJ
): version.c
200 be_all.
$(OBJ
): be_all.c
201 be_nossh.
$(OBJ
): be_nossh.c
202 be_none.
$(OBJ
): be_none.c
203 plink.
$(OBJ
): plink.c putty.h
204 pageant.
$(OBJ
): pageant.c ssh.h tree234.h
205 tree234.
$(OBJ
): tree234.c tree234.h
208 # Hack to force version.obj to be rebuilt always
209 version.obj
: versionpseudotarget
210 @echo
(built version.obj
)
212 cl
$(FWHACK
) $(VER
) $(CFLAGS
) /c version.c
215 win_res.
$(RES
): win_res.rc win_res.h putty.ico
218 rc
$(FWHACK
) $(RCFL
) -r
-DWIN32
-D_WIN32
-DWINVER
=0x0400 win_res.rc
221 nosshres.
$(RES
): nosshres.rc win_res.rc win_res.h putty.ico
224 rc
$(FWHACK
) $(RCFL
) -r
-DWIN32
-D_WIN32
-DWINVER
=0x0400 nosshres.rc
227 scp.
$(RES
): scp.rc scp.ico
230 rc
$(FWHACK
) $(RCFL
) -r
-DWIN32
-D_WIN32
-DWINVER
=0x0400 scp.rc
233 pageant.
$(RES
): pageant.rc pageant.ico pageants.ico
236 rc
$(FWHACK
) $(RCFL
) -r
-DWIN32
-D_WIN32
-DWINVER
=0x0400 pageant.rc