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
35 cl
$(COMPAT
) $(FWHACK
) $(CFLAGS
) /c
$*.c
40 ##-- objects putty puttytel
41 GOBJS1
= window.
$(OBJ
) windlg.
$(OBJ
) terminal.
$(OBJ
) telnet.
$(OBJ
) raw.
$(OBJ
)
42 GOBJS2
= xlat.
$(OBJ
) ldisc.
$(OBJ
) sizetip.
$(OBJ
)
44 POBJS
= ssh.
$(OBJ
) be_all.
$(OBJ
)
46 TOBJS
= be_nossh.
$(OBJ
)
48 SOBJS
= scp.
$(OBJ
) windlg.
$(OBJ
) scpssh.
$(OBJ
) be_none.
$(OBJ
)
49 ##-- objects putty puttytel pscp
50 MOBJS
= misc.
$(OBJ
) version.
$(OBJ
)
51 ##-- objects putty pscp
52 OBJS1
= sshcrc.
$(OBJ
) sshdes.
$(OBJ
) sshmd5.
$(OBJ
) sshrsa.
$(OBJ
) sshrand.
$(OBJ
)
53 OBJS2
= sshsha.
$(OBJ
) sshblowf.
$(OBJ
) noise.
$(OBJ
)
55 PRESRC
= win_res.
$(RES
)
56 ##-- resources puttytel
57 TRESRC
= nossh_res.
$(RES
)
69 LIBS1
= advapi32.lib user32.lib gdi32.lib
70 LIBS2
= wsock32.lib comctl32.lib comdlg32.lib
72 all: putty.exe puttytel.exe pscp.exe
74 putty.exe
: $(GOBJS1
) $(GOBJS2
) $(POBJS
) $(MOBJS
) $(OBJS1
) $(OBJS2
) $(PRESRC
) putty.rsp
75 link
/debug
-out
:putty.exe @putty.rsp
77 puttytel.exe
: $(GOBJS1
) $(GOBJS2
) $(TOBJS
) $(MOBJS
) $(PRESRC
) puttytel.rsp
78 link
/debug
-out
:puttytel.exe @puttytel.rsp
80 pscp.exe
: $(SOBJS
) $(OBJS1
) $(OBJS2
) $(OBJS3
) $(SRESRC
) pscp.rsp
81 link
/debug
-out
:pscp.exe @pscp.rsp
84 echo
/nologo
/subsystem
:windows
> putty.rsp
85 echo
$(GOBJS1
) >> putty.rsp
86 echo
$(GOBJS2
) >> putty.rsp
87 echo
$(POBJS
) >> putty.rsp
88 echo
$(MOBJS
) >> putty.rsp
89 echo
$(OBJS1
) >> putty.rsp
90 echo
$(OBJS2
) >> putty.rsp
91 echo
$(PRESRC
) >> putty.rsp
92 echo
$(LIBS1
) >> putty.rsp
93 echo
$(LIBS2
) >> putty.rsp
95 puttytel.rsp
: makefile
96 echo
/nologo
/subsystem
:windows
> puttytel.rsp
97 echo
$(GOBJS1
) >> puttytel.rsp
98 echo
$(GOBJS2
) >> puttytel.rsp
99 echo
$(TOBJS
) >> puttytel.rsp
100 echo
$(MOBJS
) >> puttytel.rsp
101 echo
$(TRESRC
) >> puttytel.rsp
102 echo
$(LIBS1
) >> puttytel.rsp
103 echo
$(LIBS2
) >> puttytel.rsp
106 echo
/nologo
/subsystem
:console
> pscp.rsp
107 echo
$(SOBJS
) >> pscp.rsp
108 echo
$(MOBJS
) >> pscp.rsp
109 echo
$(OBJS1
) >> pscp.rsp
110 echo
$(OBJS2
) >> pscp.rsp
111 echo
$(SRESRC
) >> pscp.rsp
112 echo
$(LIBS1
) >> pscp.rsp
113 echo
$(LIBS2
) >> pscp.rsp
116 window.
$(OBJ
): window.c putty.h win_res.h
117 windlg.
$(OBJ
): windlg.c putty.h ssh.h win_res.h
118 terminal.
$(OBJ
): terminal.c putty.h
119 sizetip.
$(OBJ
): sizetip.c putty.h
120 telnet.
$(OBJ
): telnet.c putty.h
121 raw.
$(OBJ
): raw.c putty.h
122 xlat.
$(OBJ
): xlat.c putty.h
123 ldisc.
$(OBJ
): ldisc.c putty.h
124 misc.
$(OBJ
): misc.c putty.h
125 noise.
$(OBJ
): noise.c putty.h ssh.h
126 ssh.
$(OBJ
): ssh.c ssh.h putty.h
127 sshcrc.
$(OBJ
): sshcrc.c ssh.h
128 sshdes.
$(OBJ
): sshdes.c ssh.h
129 sshmd5.
$(OBJ
): sshmd5.c ssh.h
130 sshrsa.
$(OBJ
): sshrsa.c ssh.h
131 sshsha.
$(OBJ
): sshsha.c ssh.h
132 sshrand.
$(OBJ
): sshrand.c ssh.h
133 sshblowf.
$(OBJ
): sshblowf.c ssh.h
134 scp.
$(OBJ
): scp.c putty.h scp.h
135 scpssh.
$(OBJ
): scpssh.c putty.h ssh.h scp.h
136 version.
$(OBJ
): version.c
137 be_all.
$(OBJ
): be_all.c
138 be_nossh.
$(OBJ
): be_nossh.c
139 be_none.
$(OBJ
): be_none.c
142 # Hack to force version.obj to be rebuilt always
143 version.obj
: versionpseudotarget
144 @echo
(built version.obj
)
146 cl
$(FWHACK
) $(VER
) $(CFLAGS
) /c version.c
149 win_res.
$(RES
): win_res.rc win_res.h putty.ico
152 rc
$(FWHACK
) $(RCFL
) -r
-DWIN32
-D_WIN32
-DWINVER
=0x0400 win_res.rc
155 nossh_res.
$(RES
): nossh_res.rc win_res.h putty.ico
158 rc
$(FWHACK
) $(RCFL
) -r
-DWIN32
-D_WIN32
-DWINVER
=0x0400 nossh_res.rc
161 scp.
$(RES
): scp.rc scp.ico
164 rc
$(FWHACK
) $(RCFL
) -r
-DWIN32
-D_WIN32
-DWINVER
=0x0400 scp.rc