]> asedeno.scripts.mit.edu Git - PuTTY.git/blob - Makefile
PuTTY website URL spelling change
[PuTTY.git] / Makefile
1 # Visual C++ Makefile for PuTTY.
2 #
3 # Use `nmake' to build.
4 #
5
6 ##-- help
7 #
8 # Extra options you can set:
9 #
10 #  - FWHACK=/DFWHACK
11 #      Enables a hack that tunnels through some firewall proxies.
12 #
13 #  - VER=/DSNAPSHOT=1999-01-25
14 #      Generates executables whose About box report them as being a
15 #      development snapshot.
16 #
17 #  - VER=/DRELEASE=0.43
18 #      Generates executables whose About box report them as being a
19 #      release version.
20 #
21 #  - COMPAT=/DWIN32S_COMPAT
22 #      Generates a binary that works (minimally) with Win32s.
23 #
24 #  - RCFL=/DASCIICTLS
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
28 #      problem with it.
29 #
30 ##--
31
32 CFLAGS = /nologo /W3 /YX /O2 /Yd /D_WINDOWS /DDEBUG /ML /Fd
33
34 .c.obj:
35         cl $(COMPAT) $(FWHACK) $(CFLAGS) /c $*.c
36
37 OBJ=obj
38 RES=res
39
40 ##-- objects putty puttytel
41 GOBJS1 = window.$(OBJ) windlg.$(OBJ) terminal.$(OBJ) telnet.$(OBJ) raw.$(OBJ)
42 GOBJS2 = xlat.$(OBJ) ldisc.$(OBJ) sizetip.$(OBJ)
43 ##-- objects putty
44 POBJS = ssh.$(OBJ) be_all.$(OBJ)
45 ##-- objects puttytel
46 TOBJS = be_nossh.$(OBJ)
47 ##-- objects pscp
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)
54 ##-- resources putty
55 PRESRC = win_res.$(RES)
56 ##-- resources puttytel
57 TRESRC = nossh_res.$(RES)
58 ##-- resources pscp
59 SRESRC = scp.$(RES)
60 ##--
61
62 ##-- gui-apps
63 # putty
64 # puttytel
65 ##-- console-apps
66 # pscp
67 ##--
68
69 LIBS1 = advapi32.lib user32.lib gdi32.lib
70 LIBS2 = wsock32.lib comctl32.lib comdlg32.lib
71
72 all: putty.exe puttytel.exe pscp.exe
73
74 putty.exe: $(GOBJS1) $(GOBJS2) $(POBJS) $(MOBJS) $(OBJS1) $(OBJS2) $(PRESRC) putty.rsp
75         link /debug -out:putty.exe @putty.rsp
76
77 puttytel.exe: $(GOBJS1) $(GOBJS2) $(TOBJS) $(MOBJS) $(TRESRC) puttytel.rsp
78         link /debug -out:puttytel.exe @puttytel.rsp
79
80 pscp.exe: $(SOBJS) $(OBJS1) $(OBJS2) $(OBJS3) $(SRESRC) pscp.rsp
81         link /debug -out:pscp.exe @pscp.rsp
82
83 putty.rsp: makefile
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
94
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
104
105 pscp.rsp: makefile
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
114
115 ##-- dependencies
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
140 ##--
141
142 # Hack to force version.obj to be rebuilt always
143 version.obj: versionpseudotarget
144         @echo (built version.obj)
145 versionpseudotarget:
146         cl $(FWHACK) $(VER) $(CFLAGS) /c version.c
147
148 ##-- dependencies
149 win_res.$(RES): win_res.rc win_res.h putty.ico
150 ##--
151 win_res.$(RES):
152         rc $(FWHACK) $(RCFL) -r -DWIN32 -D_WIN32 -DWINVER=0x0400 win_res.rc
153
154 ##-- dependencies
155 nossh_res.$(RES): nossh_res.rc win_res.rc win_res.h putty.ico
156 ##--
157 nossh_res.$(RES):
158         rc $(FWHACK) $(RCFL) -r -DWIN32 -D_WIN32 -DWINVER=0x0400 nossh_res.rc
159
160 ##-- dependencies
161 scp.$(RES): scp.rc scp.ico
162 ##--
163 scp.$(RES):
164         rc $(FWHACK) $(RCFL) -r -DWIN32 -D_WIN32 -DWINVER=0x0400 scp.rc
165
166 clean:
167         del *.obj
168         del *.exe
169         del *.res
170         del *.pch
171         del *.aps
172         del *.ilk
173         del *.pdb
174         del *.rsp