374330e2 |
1 | # Makefile for PuTTY. Use `FWHACK=/DFWHACK' to cause the firewall hack |
2 | # to be built in. (requires rebuild of ssh.obj only) |
3 | |
067a15ea |
4 | # Can also build with `VER=/DSNAPSHOT=1999-01-25' or |
5 | # `VER=/DRELEASE=0.43' to get version numbering; otherwise you'll |
6 | # get `Unidentified build'. |
7 | |
676c0556 |
8 | # COMPAT=/DWIN32S_COMPAT will produce a binary that works (minimally) |
9 | # with Win32s |
10 | |
5f48a59c |
11 | CFLAGS = /nologo /W3 /YX /O2 /Yd /D_WINDOWS /DDEBUG /ML /Fd |
374330e2 |
12 | |
13 | .c.obj: |
676c0556 |
14 | cl $(COMPAT) $(FWHACK) $(CFLAGS) /c $*.c |
374330e2 |
15 | |
5e1a8e27 |
16 | PUTTYOBJS = window.obj windlg.obj terminal.obj telnet.obj raw.obj |
067a15ea |
17 | OBJS1 = misc.obj noise.obj |
374330e2 |
18 | OBJS2 = ssh.obj sshcrc.obj sshdes.obj sshmd5.obj sshrsa.obj sshrand.obj |
676c0556 |
19 | OBJS3 = sshsha.obj sshblowf.obj version.obj sizetip.obj |
374330e2 |
20 | RESRC = win_res.res |
21 | LIBS1 = advapi32.lib user32.lib gdi32.lib |
0cb88877 |
22 | LIBS2 = wsock32.lib comctl32.lib comdlg32.lib |
4585985c |
23 | SCPOBJS = scp.obj windlg.obj misc.obj noise.obj |
24 | SCPOBJS2 = scpssh.obj sshcrc.obj sshdes.obj sshmd5.obj |
25 | SCPOBJS3 = sshrsa.obj sshrand.obj sshsha.obj sshblowf.obj version.obj |
26 | |
27 | all: putty.exe pscp.exe |
374330e2 |
28 | |
067a15ea |
29 | putty.exe: $(PUTTYOBJS) $(OBJS1) $(OBJS2) $(OBJS3) $(RESRC) link.rsp |
374330e2 |
30 | link /debug -out:putty.exe @link.rsp |
31 | |
067a15ea |
32 | puttyd.exe: $(PUTTYOBJS) $(OBJS1) $(OBJS2) $(OBJS3) $(RESRC) link.rsp |
374330e2 |
33 | link /debug -out:puttyd.exe @link.rsp |
34 | |
35 | link.rsp: makefile |
36 | echo /nologo /subsystem:windows > link.rsp |
067a15ea |
37 | echo $(PUTTYOBJS) >> link.rsp |
374330e2 |
38 | echo $(OBJS1) >> link.rsp |
39 | echo $(OBJS2) >> link.rsp |
40 | echo $(OBJS3) >> link.rsp |
41 | echo $(RESRC) >> link.rsp |
42 | echo $(LIBS1) >> link.rsp |
43 | echo $(LIBS2) >> link.rsp |
44 | |
29ea56b5 |
45 | window.obj: window.c putty.h win_res.h sizetip.h |
374330e2 |
46 | windlg.obj: windlg.c putty.h ssh.h win_res.h |
47 | terminal.obj: terminal.c putty.h |
29ea56b5 |
48 | sizetip.obj: sizetip.c putty.h |
374330e2 |
49 | telnet.obj: telnet.c putty.h |
5e1a8e27 |
50 | raw.obj: raw.c putty.h |
374330e2 |
51 | misc.obj: misc.c putty.h |
52 | noise.obj: noise.c putty.h ssh.h |
53 | ssh.obj: ssh.c ssh.h putty.h |
54 | sshcrc.obj: sshcrc.c ssh.h |
55 | sshdes.obj: sshdes.c ssh.h |
56 | sshmd5.obj: sshmd5.c ssh.h |
57 | sshrsa.obj: sshrsa.c ssh.h |
58 | sshsha.obj: sshsha.c ssh.h |
59 | sshrand.obj: sshrand.c ssh.h |
840de66d |
60 | sshblowf.obj: sshblowf.c ssh.h |
067a15ea |
61 | version.obj: versionpseudotarget |
8eb69d67 |
62 | @echo (built version.obj) |
067a15ea |
63 | |
64 | # Hack to force version.obj to be rebuilt always |
65 | versionpseudotarget: |
66 | cl $(FWHACK) $(VER) $(CFLAGS) /c version.c |
374330e2 |
67 | |
68 | win_res.res: win_res.rc win_res.h putty.ico |
067a15ea |
69 | rc $(FWHACK) -r -DWIN32 -D_WIN32 -DWINVER=0x0400 win_res.rc |
374330e2 |
70 | |
4585985c |
71 | pscp.exe: $(SCPOBJS) $(SCPOBJS2) $(SCPOBJS3) scp.res scp.rsp |
72 | link /debug -out:pscp.exe @scp.rsp |
73 | |
74 | scp.rsp: makefile |
75 | echo /nologo /subsystem:console > scp.rsp |
76 | echo $(SCPOBJS) >> scp.rsp |
77 | echo $(SCPOBJS2) >> scp.rsp |
78 | echo $(SCPOBJS3) >> scp.rsp |
672a8203 |
79 | echo scp.res >> scp.rsp |
80 | echo $(LIBS1) >> scp.rsp |
81 | echo $(LIBS2) >> scp.rsp |
4585985c |
82 | |
83 | scp.obj: scp.c putty.h scp.h |
84 | scpssh.obj: scpssh.c putty.h ssh.h scp.h |
85 | |
86 | scp.res: scp.rc scp.ico |
87 | rc -r -DWIN32 -D_WIN32 -DWINVER=0x0400 scp.rc |
88 | |
374330e2 |
89 | clean: |
90 | del *.obj |
91 | del *.exe |
92 | del *.res |
93 | del *.pch |
94 | del *.aps |
95 | del *.ilk |
96 | del *.pdb |
067a15ea |
97 | del *.rsp |