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
53 POBJS
= ssh.
$(OBJ
) be_all.
$(OBJ
)
55 TOBJS
= be_nossh.
$(OBJ
)
57 PLOBJS
= plink.
$(OBJ
) windlg.
$(OBJ
)
59 SOBJS
= scp.
$(OBJ
) windlg.
$(OBJ
) ssh.
$(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
)
67 PRESRC
= win_res.
$(RES
)
68 ##-- resources puttytel
69 TRESRC
= nosshres.
$(RES
)
83 LIBS1
= advapi32.lib user32.lib gdi32.lib
84 LIBS2
= comctl32.lib comdlg32.lib
88 all: putty.exe puttytel.exe pscp.exe plink.exe
90 putty.exe
: $(GOBJS1
) $(GOBJS2
) $(LOBJS1
) $(POBJS
) $(MOBJS
) $(OBJS1
) $(OBJS2
) $(OBJS3
) $(PRESRC
) putty.rsp
91 link
$(LFLAGS
) -out
:putty.exe @putty.rsp
93 puttytel.exe
: $(GOBJS1
) $(GOBJS2
) $(LOBJS1
) $(TOBJS
) $(MOBJS
) $(TRESRC
) puttytel.rsp
94 link
$(LFLAGS
) -out
:puttytel.exe @puttytel.rsp
96 pscp.exe
: $(SOBJS
) $(MOBJS
) $(OBJS1
) $(OBJS2
) $(OBJS3
) $(SRESRC
) pscp.rsp
97 link
$(LFLAGS
) -out
:pscp.exe @pscp.rsp
99 plink.exe
: $(LOBJS1
) $(POBJS
) $(PLOBJS
) $(MOBJS
) $(OBJS1
) $(OBJS2
) $(OBJS3
) $(LRESRC
) plink.rsp
100 link
$(LFLAGS
) -out
:plink.exe @plink.rsp
103 echo
/nologo
/subsystem
:windows
> putty.rsp
104 echo
$(GOBJS1
) >> putty.rsp
105 echo
$(GOBJS2
) >> putty.rsp
106 echo
$(LOBJS1
) >> putty.rsp
107 echo
$(POBJS
) >> putty.rsp
108 echo
$(MOBJS
) >> putty.rsp
109 echo
$(OBJS1
) >> putty.rsp
110 echo
$(OBJS2
) >> putty.rsp
111 echo
$(OBJS3
) >> putty.rsp
112 echo
$(PRESRC
) >> putty.rsp
113 echo
$(LIBS1
) >> putty.rsp
114 echo
$(LIBS2
) >> putty.rsp
115 echo
$(SOCK1
) >> putty.rsp
117 puttytel.rsp
: makefile
118 echo
/nologo
/subsystem
:windows
> puttytel.rsp
119 echo
$(GOBJS1
) >> puttytel.rsp
120 echo
$(GOBJS2
) >> puttytel.rsp
121 echo
$(LOBJS1
) >> puttytel.rsp
122 echo
$(TOBJS
) >> puttytel.rsp
123 echo
$(MOBJS
) >> puttytel.rsp
124 echo
$(TRESRC
) >> puttytel.rsp
125 echo
$(LIBS1
) >> puttytel.rsp
126 echo
$(LIBS2
) >> puttytel.rsp
127 echo
$(SOCK1
) >> puttytel.rsp
130 echo
/nologo
/subsystem
:console
> pscp.rsp
131 echo
$(SOBJS
) >> pscp.rsp
132 echo
$(MOBJS
) >> pscp.rsp
133 echo
$(OBJS1
) >> pscp.rsp
134 echo
$(OBJS2
) >> pscp.rsp
135 echo
$(OBJS3
) >> pscp.rsp
136 echo
$(SRESRC
) >> pscp.rsp
137 echo
$(LIBS1
) >> pscp.rsp
138 echo
$(LIBS2
) >> pscp.rsp
139 echo
$(SOCK1
) >> pscp.rsp
142 echo
/nologo
/subsystem
:console
> plink.rsp
143 echo
$(LOBJS1
) >> plink.rsp
144 echo
$(POBJS
) >> plink.rsp
145 echo
$(PLOBJS
) >> plink.rsp
146 echo
$(MOBJS
) >> plink.rsp
147 echo
$(OBJS1
) >> plink.rsp
148 echo
$(OBJS2
) >> plink.rsp
149 echo
$(OBJS3
) >> plink.rsp
150 echo
$(LRESRC
) >> plink.rsp
151 echo
$(LIBS1
) >> plink.rsp
152 echo
$(LIBS2
) >> plink.rsp
153 echo
$(SOCK2
) >> plink.rsp
156 window.
$(OBJ
): window.c putty.h win_res.h
157 windlg.
$(OBJ
): windlg.c putty.h ssh.h win_res.h
158 terminal.
$(OBJ
): terminal.c putty.h
159 sizetip.
$(OBJ
): sizetip.c putty.h
160 telnet.
$(OBJ
): telnet.c putty.h
161 raw.
$(OBJ
): raw.c putty.h
162 xlat.
$(OBJ
): xlat.c putty.h
163 ldisc.
$(OBJ
): ldisc.c putty.h
164 misc.
$(OBJ
): misc.c putty.h
165 noise.
$(OBJ
): noise.c putty.h ssh.h
166 ssh.
$(OBJ
): ssh.c ssh.h putty.h
167 sshcrc.
$(OBJ
): sshcrc.c ssh.h
168 sshdes.
$(OBJ
): sshdes.c ssh.h
169 sshmd5.
$(OBJ
): sshmd5.c ssh.h
170 sshrsa.
$(OBJ
): sshrsa.c ssh.h
171 sshsha.
$(OBJ
): sshsha.c ssh.h
172 sshrand.
$(OBJ
): sshrand.c ssh.h
173 sshblowf.
$(OBJ
): sshblowf.c ssh.h
174 sshdh.
$(OBJ
): sshdh.c ssh.h
175 sshdss.
$(OBJ
): sshdss.c ssh.h
176 sshbn.
$(OBJ
): sshbn.c ssh.h
177 sshpubk.
$(OBJ
): sshpubk.c ssh.h
178 scp.
$(OBJ
): scp.c putty.h scp.h
179 version.
$(OBJ
): version.c
180 be_all.
$(OBJ
): be_all.c
181 be_nossh.
$(OBJ
): be_nossh.c
182 be_none.
$(OBJ
): be_none.c
183 plink.
$(OBJ
): plink.c putty.h
186 # Hack to force version.obj to be rebuilt always
187 version.obj
: versionpseudotarget
188 @echo
(built version.obj
)
190 cl
$(FWHACK
) $(VER
) $(CFLAGS
) /c version.c
193 win_res.
$(RES
): win_res.rc win_res.h putty.ico
196 rc
$(FWHACK
) $(RCFL
) -r
-DWIN32
-D_WIN32
-DWINVER
=0x0400 win_res.rc
199 nosshres.
$(RES
): nosshres.rc win_res.rc win_res.h putty.ico
202 rc
$(FWHACK
) $(RCFL
) -r
-DWIN32
-D_WIN32
-DWINVER
=0x0400 nosshres.rc
205 scp.
$(RES
): scp.rc scp.ico
208 rc
$(FWHACK
) $(RCFL
) -r
-DWIN32
-D_WIN32
-DWINVER
=0x0400 scp.rc