Oleg Panashchenko's Cyrillic support patch
[u/mdw/putty] / Makefile
... / ...
CommitLineData
1# Makefile for PuTTY. Use `FWHACK=/DFWHACK' to cause the firewall hack
2# to be built in. (requires rebuild of ssh.obj only)
3
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
8# COMPAT=/DWIN32S_COMPAT will produce a binary that works (minimally)
9# with Win32s
10
11CFLAGS = /nologo /W3 /YX /O2 /Yd /D_WINDOWS /DDEBUG /ML /Fd
12
13.c.obj:
14 cl $(COMPAT) $(FWHACK) $(CFLAGS) /c $*.c
15
16PUTTYOBJS = window.obj windlg.obj terminal.obj telnet.obj raw.obj xlat.obj
17OBJS1 = misc.obj noise.obj
18OBJS2 = ssh.obj sshcrc.obj sshdes.obj sshmd5.obj sshrsa.obj sshrand.obj
19OBJS3 = sshsha.obj sshblowf.obj version.obj sizetip.obj
20RESRC = win_res.res
21LIBS1 = advapi32.lib user32.lib gdi32.lib
22LIBS2 = wsock32.lib comctl32.lib comdlg32.lib
23SCPOBJS = scp.obj windlg.obj misc.obj noise.obj
24SCPOBJS2 = scpssh.obj sshcrc.obj sshdes.obj sshmd5.obj
25SCPOBJS3 = sshrsa.obj sshrand.obj sshsha.obj sshblowf.obj version.obj
26
27all: putty.exe pscp.exe
28
29putty.exe: $(PUTTYOBJS) $(OBJS1) $(OBJS2) $(OBJS3) $(RESRC) link.rsp
30 link /debug -out:putty.exe @link.rsp
31
32puttyd.exe: $(PUTTYOBJS) $(OBJS1) $(OBJS2) $(OBJS3) $(RESRC) link.rsp
33 link /debug -out:puttyd.exe @link.rsp
34
35link.rsp: makefile
36 echo /nologo /subsystem:windows > link.rsp
37 echo $(PUTTYOBJS) >> link.rsp
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
45window.obj: window.c putty.h win_res.h sizetip.h
46windlg.obj: windlg.c putty.h ssh.h win_res.h
47terminal.obj: terminal.c putty.h
48sizetip.obj: sizetip.c putty.h
49telnet.obj: telnet.c putty.h
50raw.obj: raw.c putty.h
51xlat.obj: xlat.c putty.h
52misc.obj: misc.c putty.h
53noise.obj: noise.c putty.h ssh.h
54ssh.obj: ssh.c ssh.h putty.h
55sshcrc.obj: sshcrc.c ssh.h
56sshdes.obj: sshdes.c ssh.h
57sshmd5.obj: sshmd5.c ssh.h
58sshrsa.obj: sshrsa.c ssh.h
59sshsha.obj: sshsha.c ssh.h
60sshrand.obj: sshrand.c ssh.h
61sshblowf.obj: sshblowf.c ssh.h
62version.obj: versionpseudotarget
63 @echo (built version.obj)
64
65# Hack to force version.obj to be rebuilt always
66versionpseudotarget:
67 cl $(FWHACK) $(VER) $(CFLAGS) /c version.c
68
69win_res.res: win_res.rc win_res.h putty.ico
70 rc $(FWHACK) -r -DWIN32 -D_WIN32 -DWINVER=0x0400 win_res.rc
71
72pscp.exe: $(SCPOBJS) $(SCPOBJS2) $(SCPOBJS3) scp.res scp.rsp
73 link /debug -out:pscp.exe @scp.rsp
74
75scp.rsp: makefile
76 echo /nologo /subsystem:console > scp.rsp
77 echo $(SCPOBJS) >> scp.rsp
78 echo $(SCPOBJS2) >> scp.rsp
79 echo $(SCPOBJS3) >> scp.rsp
80 echo scp.res >> scp.rsp
81 echo $(LIBS1) >> scp.rsp
82 echo $(LIBS2) >> scp.rsp
83
84scp.obj: scp.c putty.h scp.h
85scpssh.obj: scpssh.c putty.h ssh.h scp.h
86
87scp.res: scp.rc scp.ico
88 rc -r -DWIN32 -D_WIN32 -DWINVER=0x0400 scp.rc
89
90clean:
91 del *.obj
92 del *.exe
93 del *.res
94 del *.pch
95 del *.aps
96 del *.ilk
97 del *.pdb
98 del *.rsp