3d541627 |
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 | # |
6ed3635b |
24 | # - RCFL=/DASCIICTLS |
760858ff |
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 | # |
3d541627 |
30 | ##-- |
676c0556 |
31 | |
5f48a59c |
32 | CFLAGS = /nologo /W3 /YX /O2 /Yd /D_WINDOWS /DDEBUG /ML /Fd |
373e94e9 |
33 | # LFLAGS = /debug |
34 | |
35 | # Use MSVC DLL |
c9def1b8 |
36 | # CFLAGS = /nologo /W3 /YX /O2 /Yd /D_WINDOWS /DDEBUG /MD /Fd |
373e94e9 |
37 | |
38 | # Disable debug and incremental linking |
39 | LFLAGS = /incremental:no |
374330e2 |
40 | |
41 | .c.obj: |
676c0556 |
42 | cl $(COMPAT) $(FWHACK) $(CFLAGS) /c $*.c |
374330e2 |
43 | |
3d541627 |
44 | OBJ=obj |
45 | RES=res |
46 | |
89ee5268 |
47 | ##-- objects putty puttytel |
48 | GOBJS1 = window.$(OBJ) windlg.$(OBJ) terminal.$(OBJ) telnet.$(OBJ) raw.$(OBJ) |
49 | GOBJS2 = xlat.$(OBJ) ldisc.$(OBJ) sizetip.$(OBJ) |
3d541627 |
50 | ##-- objects putty |
89ee5268 |
51 | POBJS = ssh.$(OBJ) be_all.$(OBJ) |
52 | ##-- objects puttytel |
53 | TOBJS = be_nossh.$(OBJ) |
3d541627 |
54 | ##-- objects pscp |
fb09bf1c |
55 | SOBJS = scp.$(OBJ) windlg.$(OBJ) ssh.$(OBJ) be_none.$(OBJ) |
89ee5268 |
56 | ##-- objects putty puttytel pscp |
57 | MOBJS = misc.$(OBJ) version.$(OBJ) |
3d541627 |
58 | ##-- objects putty pscp |
89ee5268 |
59 | OBJS1 = sshcrc.$(OBJ) sshdes.$(OBJ) sshmd5.$(OBJ) sshrsa.$(OBJ) sshrand.$(OBJ) |
e5574168 |
60 | OBJS2 = sshsha.$(OBJ) sshblowf.$(OBJ) noise.$(OBJ) sshdh.$(OBJ) sshdss.$(OBJ) |
61 | OBJS3 = sshbn.$(OBJ) |
3d541627 |
62 | ##-- resources putty |
63 | PRESRC = win_res.$(RES) |
89ee5268 |
64 | ##-- resources puttytel |
0ac99c2f |
65 | TRESRC = nosshres.$(RES) |
3d541627 |
66 | ##-- resources pscp |
67 | SRESRC = scp.$(RES) |
68 | ##-- |
69 | |
70 | ##-- gui-apps |
71 | # putty |
89ee5268 |
72 | # puttytel |
3d541627 |
73 | ##-- console-apps |
74 | # pscp |
75 | ##-- |
76 | |
374330e2 |
77 | LIBS1 = advapi32.lib user32.lib gdi32.lib |
0cb88877 |
78 | LIBS2 = wsock32.lib comctl32.lib comdlg32.lib |
4585985c |
79 | |
89ee5268 |
80 | all: putty.exe puttytel.exe pscp.exe |
81 | |
e5574168 |
82 | putty.exe: $(GOBJS1) $(GOBJS2) $(POBJS) $(MOBJS) $(OBJS1) $(OBJS2) $(OBJS3) $(PRESRC) putty.rsp |
373e94e9 |
83 | link $(LFLAGS) -out:putty.exe @putty.rsp |
89ee5268 |
84 | |
3022b17c |
85 | puttytel.exe: $(GOBJS1) $(GOBJS2) $(TOBJS) $(MOBJS) $(TRESRC) puttytel.rsp |
373e94e9 |
86 | link $(LFLAGS) -out:puttytel.exe @puttytel.rsp |
89ee5268 |
87 | |
0ac99c2f |
88 | pscp.exe: $(SOBJS) $(MOBJS) $(OBJS1) $(OBJS2) $(OBJS3) $(SRESRC) pscp.rsp |
373e94e9 |
89 | link $(LFLAGS) -out:pscp.exe @pscp.rsp |
89ee5268 |
90 | |
91 | putty.rsp: makefile |
92 | echo /nologo /subsystem:windows > putty.rsp |
93 | echo $(GOBJS1) >> putty.rsp |
94 | echo $(GOBJS2) >> putty.rsp |
95 | echo $(POBJS) >> putty.rsp |
96 | echo $(MOBJS) >> putty.rsp |
97 | echo $(OBJS1) >> putty.rsp |
98 | echo $(OBJS2) >> putty.rsp |
e5574168 |
99 | echo $(OBJS3) >> putty.rsp |
89ee5268 |
100 | echo $(PRESRC) >> putty.rsp |
101 | echo $(LIBS1) >> putty.rsp |
102 | echo $(LIBS2) >> putty.rsp |
103 | |
104 | puttytel.rsp: makefile |
105 | echo /nologo /subsystem:windows > puttytel.rsp |
106 | echo $(GOBJS1) >> puttytel.rsp |
107 | echo $(GOBJS2) >> puttytel.rsp |
108 | echo $(TOBJS) >> puttytel.rsp |
109 | echo $(MOBJS) >> puttytel.rsp |
110 | echo $(TRESRC) >> puttytel.rsp |
111 | echo $(LIBS1) >> puttytel.rsp |
112 | echo $(LIBS2) >> puttytel.rsp |
113 | |
114 | pscp.rsp: makefile |
115 | echo /nologo /subsystem:console > pscp.rsp |
116 | echo $(SOBJS) >> pscp.rsp |
117 | echo $(MOBJS) >> pscp.rsp |
118 | echo $(OBJS1) >> pscp.rsp |
119 | echo $(OBJS2) >> pscp.rsp |
e5574168 |
120 | echo $(OBJS3) >> pscp.rsp |
89ee5268 |
121 | echo $(SRESRC) >> pscp.rsp |
122 | echo $(LIBS1) >> pscp.rsp |
123 | echo $(LIBS2) >> pscp.rsp |
3d541627 |
124 | |
125 | ##-- dependencies |
126 | window.$(OBJ): window.c putty.h win_res.h |
127 | windlg.$(OBJ): windlg.c putty.h ssh.h win_res.h |
128 | terminal.$(OBJ): terminal.c putty.h |
129 | sizetip.$(OBJ): sizetip.c putty.h |
130 | telnet.$(OBJ): telnet.c putty.h |
131 | raw.$(OBJ): raw.c putty.h |
132 | xlat.$(OBJ): xlat.c putty.h |
133 | ldisc.$(OBJ): ldisc.c putty.h |
134 | misc.$(OBJ): misc.c putty.h |
135 | noise.$(OBJ): noise.c putty.h ssh.h |
136 | ssh.$(OBJ): ssh.c ssh.h putty.h |
137 | sshcrc.$(OBJ): sshcrc.c ssh.h |
138 | sshdes.$(OBJ): sshdes.c ssh.h |
139 | sshmd5.$(OBJ): sshmd5.c ssh.h |
140 | sshrsa.$(OBJ): sshrsa.c ssh.h |
141 | sshsha.$(OBJ): sshsha.c ssh.h |
142 | sshrand.$(OBJ): sshrand.c ssh.h |
143 | sshblowf.$(OBJ): sshblowf.c ssh.h |
e5574168 |
144 | sshdh.$(OBJ): sshdh.c ssh.h |
145 | sshdss.$(OBJ): sshdss.c ssh.h |
146 | sshbn.$(OBJ): sshbn.c ssh.h |
3d541627 |
147 | scp.$(OBJ): scp.c putty.h scp.h |
3d541627 |
148 | version.$(OBJ): version.c |
89ee5268 |
149 | be_all.$(OBJ): be_all.c |
150 | be_nossh.$(OBJ): be_nossh.c |
151 | be_none.$(OBJ): be_none.c |
3d541627 |
152 | ##-- |
067a15ea |
153 | |
154 | # Hack to force version.obj to be rebuilt always |
3d541627 |
155 | version.obj: versionpseudotarget |
156 | @echo (built version.obj) |
067a15ea |
157 | versionpseudotarget: |
158 | cl $(FWHACK) $(VER) $(CFLAGS) /c version.c |
374330e2 |
159 | |
3d541627 |
160 | ##-- dependencies |
161 | win_res.$(RES): win_res.rc win_res.h putty.ico |
162 | ##-- |
163 | win_res.$(RES): |
6ed3635b |
164 | rc $(FWHACK) $(RCFL) -r -DWIN32 -D_WIN32 -DWINVER=0x0400 win_res.rc |
374330e2 |
165 | |
3d541627 |
166 | ##-- dependencies |
0ac99c2f |
167 | nosshres.$(RES): nosshres.rc win_res.rc win_res.h putty.ico |
89ee5268 |
168 | ##-- |
0ac99c2f |
169 | nosshres.$(RES): |
170 | rc $(FWHACK) $(RCFL) -r -DWIN32 -D_WIN32 -DWINVER=0x0400 nosshres.rc |
89ee5268 |
171 | |
172 | ##-- dependencies |
3d541627 |
173 | scp.$(RES): scp.rc scp.ico |
174 | ##-- |
175 | scp.$(RES): |
6ed3635b |
176 | rc $(FWHACK) $(RCFL) -r -DWIN32 -D_WIN32 -DWINVER=0x0400 scp.rc |
4585985c |
177 | |
374330e2 |
178 | clean: |
179 | del *.obj |
180 | del *.exe |
181 | del *.res |
182 | del *.pch |
183 | del *.aps |
184 | del *.ilk |
185 | del *.pdb |
067a15ea |
186 | del *.rsp |