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 | |
5f48a59c |
8 | CFLAGS = /nologo /W3 /YX /O2 /Yd /D_WINDOWS /DDEBUG /ML /Fd |
374330e2 |
9 | |
10 | .c.obj: |
11 | cl $(FWHACK) $(CFLAGS) /c $*.c |
12 | |
067a15ea |
13 | PUTTYOBJS = window.obj windlg.obj terminal.obj telnet.obj |
14 | OBJS1 = misc.obj noise.obj |
374330e2 |
15 | OBJS2 = ssh.obj sshcrc.obj sshdes.obj sshmd5.obj sshrsa.obj sshrand.obj |
840de66d |
16 | OBJS3 = sshsha.obj sshblowf.obj version.obj |
374330e2 |
17 | RESRC = win_res.res |
18 | LIBS1 = advapi32.lib user32.lib gdi32.lib |
0cb88877 |
19 | LIBS2 = wsock32.lib comctl32.lib comdlg32.lib |
4585985c |
20 | SCPOBJS = scp.obj windlg.obj misc.obj noise.obj |
21 | SCPOBJS2 = scpssh.obj sshcrc.obj sshdes.obj sshmd5.obj |
22 | SCPOBJS3 = sshrsa.obj sshrand.obj sshsha.obj sshblowf.obj version.obj |
23 | |
24 | all: putty.exe pscp.exe |
374330e2 |
25 | |
067a15ea |
26 | putty.exe: $(PUTTYOBJS) $(OBJS1) $(OBJS2) $(OBJS3) $(RESRC) link.rsp |
374330e2 |
27 | link /debug -out:putty.exe @link.rsp |
28 | |
067a15ea |
29 | puttyd.exe: $(PUTTYOBJS) $(OBJS1) $(OBJS2) $(OBJS3) $(RESRC) link.rsp |
374330e2 |
30 | link /debug -out:puttyd.exe @link.rsp |
31 | |
32 | link.rsp: makefile |
33 | echo /nologo /subsystem:windows > link.rsp |
067a15ea |
34 | echo $(PUTTYOBJS) >> link.rsp |
374330e2 |
35 | echo $(OBJS1) >> link.rsp |
36 | echo $(OBJS2) >> link.rsp |
37 | echo $(OBJS3) >> link.rsp |
38 | echo $(RESRC) >> link.rsp |
39 | echo $(LIBS1) >> link.rsp |
40 | echo $(LIBS2) >> link.rsp |
41 | |
42 | window.obj: window.c putty.h win_res.h |
43 | windlg.obj: windlg.c putty.h ssh.h win_res.h |
44 | terminal.obj: terminal.c putty.h |
45 | telnet.obj: telnet.c putty.h |
46 | misc.obj: misc.c putty.h |
47 | noise.obj: noise.c putty.h ssh.h |
48 | ssh.obj: ssh.c ssh.h putty.h |
49 | sshcrc.obj: sshcrc.c ssh.h |
50 | sshdes.obj: sshdes.c ssh.h |
51 | sshmd5.obj: sshmd5.c ssh.h |
52 | sshrsa.obj: sshrsa.c ssh.h |
53 | sshsha.obj: sshsha.c ssh.h |
54 | sshrand.obj: sshrand.c ssh.h |
840de66d |
55 | sshblowf.obj: sshblowf.c ssh.h |
067a15ea |
56 | version.obj: versionpseudotarget |
8eb69d67 |
57 | @echo (built version.obj) |
067a15ea |
58 | |
59 | # Hack to force version.obj to be rebuilt always |
60 | versionpseudotarget: |
61 | cl $(FWHACK) $(VER) $(CFLAGS) /c version.c |
374330e2 |
62 | |
63 | win_res.res: win_res.rc win_res.h putty.ico |
067a15ea |
64 | rc $(FWHACK) -r -DWIN32 -D_WIN32 -DWINVER=0x0400 win_res.rc |
374330e2 |
65 | |
4585985c |
66 | pscp.exe: $(SCPOBJS) $(SCPOBJS2) $(SCPOBJS3) scp.res scp.rsp |
67 | link /debug -out:pscp.exe @scp.rsp |
68 | |
69 | scp.rsp: makefile |
70 | echo /nologo /subsystem:console > scp.rsp |
71 | echo $(SCPOBJS) >> scp.rsp |
72 | echo $(SCPOBJS2) >> scp.rsp |
73 | echo $(SCPOBJS3) >> scp.rsp |
672a8203 |
74 | echo scp.res >> scp.rsp |
75 | echo $(LIBS1) >> scp.rsp |
76 | echo $(LIBS2) >> scp.rsp |
4585985c |
77 | |
78 | scp.obj: scp.c putty.h scp.h |
79 | scpssh.obj: scpssh.c putty.h ssh.h scp.h |
80 | |
81 | scp.res: scp.rc scp.ico |
82 | rc -r -DWIN32 -D_WIN32 -DWINVER=0x0400 scp.rc |
83 | |
374330e2 |
84 | clean: |
85 | del *.obj |
86 | del *.exe |
87 | del *.res |
88 | del *.pch |
89 | del *.aps |
90 | del *.ilk |
91 | del *.pdb |
067a15ea |
92 | del *.rsp |