Added local-editing line discipline to make raw backend usable
[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
16POBJS1 = window.obj windlg.obj terminal.obj telnet.obj raw.obj
17POBJS2 = xlat.obj ldisc.obj
18OBJS1 = misc.obj noise.obj
19OBJS2 = ssh.obj sshcrc.obj sshdes.obj sshmd5.obj sshrsa.obj sshrand.obj
20OBJS3 = sshsha.obj sshblowf.obj version.obj sizetip.obj
21RESRC = win_res.res
22LIBS1 = advapi32.lib user32.lib gdi32.lib
23LIBS2 = wsock32.lib comctl32.lib comdlg32.lib
24SCPOBJS = scp.obj windlg.obj misc.obj noise.obj
25SCPOBJS2 = scpssh.obj sshcrc.obj sshdes.obj sshmd5.obj
26SCPOBJS3 = sshrsa.obj sshrand.obj sshsha.obj sshblowf.obj version.obj
27
28all: putty.exe pscp.exe
29
30putty.exe: $(POBJS1) $(POBJS2) $(OBJS1) $(OBJS2) $(OBJS3) $(RESRC) link.rsp
31 link /debug -out:putty.exe @link.rsp
32
33puttyd.exe: $(POBJS1) $(POBJS2) $(OBJS1) $(OBJS2) $(OBJS3) $(RESRC) link.rsp
34 link /debug -out:puttyd.exe @link.rsp
35
36link.rsp: makefile
37 echo /nologo /subsystem:windows > link.rsp
38 echo $(POBJS1) >> link.rsp
39 echo $(POBJS2) >> link.rsp
40 echo $(OBJS1) >> link.rsp
41 echo $(OBJS2) >> link.rsp
42 echo $(OBJS3) >> link.rsp
43 echo $(RESRC) >> link.rsp
44 echo $(LIBS1) >> link.rsp
45 echo $(LIBS2) >> link.rsp
46
47window.obj: window.c putty.h win_res.h
48windlg.obj: windlg.c putty.h ssh.h win_res.h
49terminal.obj: terminal.c putty.h
50sizetip.obj: sizetip.c putty.h
51telnet.obj: telnet.c putty.h
52raw.obj: raw.c putty.h
53xlat.obj: xlat.c putty.h
54ldisc.obj: ldisc.c putty.h
55misc.obj: misc.c putty.h
56noise.obj: noise.c putty.h ssh.h
57ssh.obj: ssh.c ssh.h putty.h
58sshcrc.obj: sshcrc.c ssh.h
59sshdes.obj: sshdes.c ssh.h
60sshmd5.obj: sshmd5.c ssh.h
61sshrsa.obj: sshrsa.c ssh.h
62sshsha.obj: sshsha.c ssh.h
63sshrand.obj: sshrand.c ssh.h
64sshblowf.obj: sshblowf.c ssh.h
65version.obj: versionpseudotarget
66 @echo (built version.obj)
67
68# Hack to force version.obj to be rebuilt always
69versionpseudotarget:
70 cl $(FWHACK) $(VER) $(CFLAGS) /c version.c
71
72win_res.res: win_res.rc win_res.h putty.ico
73 rc $(FWHACK) -r -DWIN32 -D_WIN32 -DWINVER=0x0400 win_res.rc
74
75pscp.exe: $(SCPOBJS) $(SCPOBJS2) $(SCPOBJS3) scp.res scp.rsp
76 link /debug -out:pscp.exe @scp.rsp
77
78scp.rsp: makefile
79 echo /nologo /subsystem:console > scp.rsp
80 echo $(SCPOBJS) >> scp.rsp
81 echo $(SCPOBJS2) >> scp.rsp
82 echo $(SCPOBJS3) >> scp.rsp
83 echo scp.res >> scp.rsp
84 echo $(LIBS1) >> scp.rsp
85 echo $(LIBS2) >> scp.rsp
86
87scp.obj: scp.c putty.h scp.h
88scpssh.obj: scpssh.c putty.h ssh.h scp.h
89
90scp.res: scp.rc scp.ico
91 rc -r -DWIN32 -D_WIN32 -DWINVER=0x0400 scp.rc
92
93clean:
94 del *.obj
95 del *.exe
96 del *.res
97 del *.pch
98 del *.aps
99 del *.ilk
100 del *.pdb
101 del *.rsp