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
41 POBJS1
= window.
$(OBJ
) windlg.
$(OBJ
) terminal.
$(OBJ
) telnet.
$(OBJ
) raw.
$(OBJ
)
42 POBJS2
= xlat.
$(OBJ
) ldisc.
$(OBJ
) sizetip.
$(OBJ
) ssh.
$(OBJ
)
44 SOBJS
= scp.
$(OBJ
) windlg.
$(OBJ
) scpssh.
$(OBJ
)
45 ##-- objects putty pscp
46 OBJS1
= misc.
$(OBJ
) noise.
$(OBJ
)
47 OBJS2
= sshcrc.
$(OBJ
) sshdes.
$(OBJ
) sshmd5.
$(OBJ
) sshrsa.
$(OBJ
) sshrand.
$(OBJ
)
48 OBJS3
= sshsha.
$(OBJ
) sshblowf.
$(OBJ
) version.
$(OBJ
)
50 PRESRC
= win_res.
$(RES
)
61 LIBS1
= advapi32.lib user32.lib gdi32.lib
62 LIBS2
= wsock32.lib comctl32.lib comdlg32.lib
64 all: putty.exe pscp.exe
66 putty.exe
: $(POBJS1
) $(POBJS2
) $(OBJS1
) $(OBJS2
) $(OBJS3
) $(PRESRC
) link.rsp
67 link
/debug
-out
:putty.exe @link.rsp
69 pscp.exe
: $(SOBJS
) $(OBJS1
) $(OBJS2
) $(OBJS3
) $(SRESRC
) scp.rsp
70 link
/debug
-out
:pscp.exe @scp.rsp
73 echo
/nologo
/subsystem
:windows
> link.rsp
74 echo
$(POBJS1
) >> link.rsp
75 echo
$(POBJS2
) >> link.rsp
76 echo
$(OBJS1
) >> link.rsp
77 echo
$(OBJS2
) >> link.rsp
78 echo
$(OBJS3
) >> link.rsp
79 echo
$(PRESRC
) >> link.rsp
80 echo
$(LIBS1
) >> link.rsp
81 echo
$(LIBS2
) >> link.rsp
84 echo
/nologo
/subsystem
:console
> scp.rsp
85 echo
$(SOBJS
) >> scp.rsp
86 echo
$(OBJS1
) >> scp.rsp
87 echo
$(OBJS2
) >> scp.rsp
88 echo
$(OBJS3
) >> scp.rsp
89 echo
$(SRESRC
) >> scp.rsp
90 echo
$(LIBS1
) >> scp.rsp
91 echo
$(LIBS2
) >> scp.rsp
94 window.
$(OBJ
): window.c putty.h win_res.h
95 windlg.
$(OBJ
): windlg.c putty.h ssh.h win_res.h
96 terminal.
$(OBJ
): terminal.c putty.h
97 sizetip.
$(OBJ
): sizetip.c putty.h
98 telnet.
$(OBJ
): telnet.c putty.h
99 raw.
$(OBJ
): raw.c putty.h
100 xlat.
$(OBJ
): xlat.c putty.h
101 ldisc.
$(OBJ
): ldisc.c putty.h
102 misc.
$(OBJ
): misc.c putty.h
103 noise.
$(OBJ
): noise.c putty.h ssh.h
104 ssh.
$(OBJ
): ssh.c ssh.h putty.h
105 sshcrc.
$(OBJ
): sshcrc.c ssh.h
106 sshdes.
$(OBJ
): sshdes.c ssh.h
107 sshmd5.
$(OBJ
): sshmd5.c ssh.h
108 sshrsa.
$(OBJ
): sshrsa.c ssh.h
109 sshsha.
$(OBJ
): sshsha.c ssh.h
110 sshrand.
$(OBJ
): sshrand.c ssh.h
111 sshblowf.
$(OBJ
): sshblowf.c ssh.h
112 scp.
$(OBJ
): scp.c putty.h scp.h
113 scpssh.
$(OBJ
): scpssh.c putty.h ssh.h scp.h
114 version.
$(OBJ
): version.c
117 # Hack to force version.obj to be rebuilt always
118 version.obj
: versionpseudotarget
119 @echo
(built version.obj
)
121 cl
$(FWHACK
) $(VER
) $(CFLAGS
) /c version.c
124 win_res.
$(RES
): win_res.rc win_res.h putty.ico
127 rc
$(FWHACK
) -r
-DWIN32
-D_WIN32
-DWINVER
=0x0400 win_res.rc
130 scp.
$(RES
): scp.rc scp.ico
133 rc
$(FWHACK
) -r
-DWIN32
-D_WIN32
-DWINVER
=0x0400 scp.rc