1999-12-13 17:21:42 +00:00
|
|
|
# Visual C++ Makefile for PuTTY.
|
|
|
|
#
|
|
|
|
# Use `nmake' to build.
|
|
|
|
#
|
|
|
|
|
|
|
|
##-- help
|
|
|
|
#
|
|
|
|
# Extra options you can set:
|
|
|
|
#
|
|
|
|
# - FWHACK=/DFWHACK
|
|
|
|
# Enables a hack that tunnels through some firewall proxies.
|
|
|
|
#
|
|
|
|
# - VER=/DSNAPSHOT=1999-01-25
|
|
|
|
# Generates executables whose About box report them as being a
|
|
|
|
# development snapshot.
|
|
|
|
#
|
|
|
|
# - VER=/DRELEASE=0.43
|
|
|
|
# Generates executables whose About box report them as being a
|
|
|
|
# release version.
|
|
|
|
#
|
|
|
|
# - COMPAT=/DWIN32S_COMPAT
|
|
|
|
# Generates a binary that works (minimally) with Win32s.
|
|
|
|
#
|
2000-01-19 12:16:19 +00:00
|
|
|
# - RCFL=/DASCIICTLS
|
2000-01-18 18:14:07 +00:00
|
|
|
# Uses ASCII rather than Unicode to specify the tab control in
|
|
|
|
# the resource file. Probably most useful when compiling with
|
|
|
|
# Cygnus/mingw32, whose resource compiler may have less of a
|
|
|
|
# problem with it.
|
|
|
|
#
|
1999-12-13 17:21:42 +00:00
|
|
|
##--
|
1999-11-04 11:26:07 +00:00
|
|
|
|
1999-01-19 16:09:04 +00:00
|
|
|
CFLAGS = /nologo /W3 /YX /O2 /Yd /D_WINDOWS /DDEBUG /ML /Fd
|
1999-01-08 13:02:13 +00:00
|
|
|
|
|
|
|
.c.obj:
|
1999-11-04 11:26:07 +00:00
|
|
|
cl $(COMPAT) $(FWHACK) $(CFLAGS) /c $*.c
|
1999-01-08 13:02:13 +00:00
|
|
|
|
1999-12-13 17:21:42 +00:00
|
|
|
OBJ=obj
|
|
|
|
RES=res
|
|
|
|
|
|
|
|
##-- objects putty
|
|
|
|
POBJS1 = window.$(OBJ) windlg.$(OBJ) terminal.$(OBJ) telnet.$(OBJ) raw.$(OBJ)
|
|
|
|
POBJS2 = xlat.$(OBJ) ldisc.$(OBJ) sizetip.$(OBJ) ssh.$(OBJ)
|
|
|
|
##-- objects pscp
|
|
|
|
SOBJS = scp.$(OBJ) windlg.$(OBJ) scpssh.$(OBJ)
|
|
|
|
##-- objects putty pscp
|
|
|
|
OBJS1 = misc.$(OBJ) noise.$(OBJ)
|
|
|
|
OBJS2 = sshcrc.$(OBJ) sshdes.$(OBJ) sshmd5.$(OBJ) sshrsa.$(OBJ) sshrand.$(OBJ)
|
|
|
|
OBJS3 = sshsha.$(OBJ) sshblowf.$(OBJ) version.$(OBJ)
|
|
|
|
##-- resources putty
|
|
|
|
PRESRC = win_res.$(RES)
|
|
|
|
##-- resources pscp
|
|
|
|
SRESRC = scp.$(RES)
|
|
|
|
##--
|
|
|
|
|
|
|
|
##-- gui-apps
|
|
|
|
# putty
|
|
|
|
##-- console-apps
|
|
|
|
# pscp
|
|
|
|
##--
|
|
|
|
|
1999-01-08 13:02:13 +00:00
|
|
|
LIBS1 = advapi32.lib user32.lib gdi32.lib
|
1999-02-11 09:07:20 +00:00
|
|
|
LIBS2 = wsock32.lib comctl32.lib comdlg32.lib
|
1999-09-03 15:12:04 +00:00
|
|
|
|
|
|
|
all: putty.exe pscp.exe
|
1999-01-08 13:02:13 +00:00
|
|
|
|
1999-12-13 17:21:42 +00:00
|
|
|
putty.exe: $(POBJS1) $(POBJS2) $(OBJS1) $(OBJS2) $(OBJS3) $(PRESRC) link.rsp
|
1999-01-08 13:02:13 +00:00
|
|
|
link /debug -out:putty.exe @link.rsp
|
|
|
|
|
1999-12-13 17:21:42 +00:00
|
|
|
pscp.exe: $(SOBJS) $(OBJS1) $(OBJS2) $(OBJS3) $(SRESRC) scp.rsp
|
|
|
|
link /debug -out:pscp.exe @scp.rsp
|
1999-01-08 13:02:13 +00:00
|
|
|
|
|
|
|
link.rsp: makefile
|
|
|
|
echo /nologo /subsystem:windows > link.rsp
|
1999-11-09 12:05:34 +00:00
|
|
|
echo $(POBJS1) >> link.rsp
|
|
|
|
echo $(POBJS2) >> link.rsp
|
1999-01-08 13:02:13 +00:00
|
|
|
echo $(OBJS1) >> link.rsp
|
|
|
|
echo $(OBJS2) >> link.rsp
|
|
|
|
echo $(OBJS3) >> link.rsp
|
1999-12-13 17:21:42 +00:00
|
|
|
echo $(PRESRC) >> link.rsp
|
1999-01-08 13:02:13 +00:00
|
|
|
echo $(LIBS1) >> link.rsp
|
|
|
|
echo $(LIBS2) >> link.rsp
|
|
|
|
|
1999-12-13 17:21:42 +00:00
|
|
|
scp.rsp: makefile
|
|
|
|
echo /nologo /subsystem:console > scp.rsp
|
|
|
|
echo $(SOBJS) >> scp.rsp
|
|
|
|
echo $(OBJS1) >> scp.rsp
|
|
|
|
echo $(OBJS2) >> scp.rsp
|
|
|
|
echo $(OBJS3) >> scp.rsp
|
|
|
|
echo $(SRESRC) >> scp.rsp
|
|
|
|
echo $(LIBS1) >> scp.rsp
|
|
|
|
echo $(LIBS2) >> scp.rsp
|
|
|
|
|
|
|
|
##-- dependencies
|
|
|
|
window.$(OBJ): window.c putty.h win_res.h
|
|
|
|
windlg.$(OBJ): windlg.c putty.h ssh.h win_res.h
|
|
|
|
terminal.$(OBJ): terminal.c putty.h
|
|
|
|
sizetip.$(OBJ): sizetip.c putty.h
|
|
|
|
telnet.$(OBJ): telnet.c putty.h
|
|
|
|
raw.$(OBJ): raw.c putty.h
|
|
|
|
xlat.$(OBJ): xlat.c putty.h
|
|
|
|
ldisc.$(OBJ): ldisc.c putty.h
|
|
|
|
misc.$(OBJ): misc.c putty.h
|
|
|
|
noise.$(OBJ): noise.c putty.h ssh.h
|
|
|
|
ssh.$(OBJ): ssh.c ssh.h putty.h
|
|
|
|
sshcrc.$(OBJ): sshcrc.c ssh.h
|
|
|
|
sshdes.$(OBJ): sshdes.c ssh.h
|
|
|
|
sshmd5.$(OBJ): sshmd5.c ssh.h
|
|
|
|
sshrsa.$(OBJ): sshrsa.c ssh.h
|
|
|
|
sshsha.$(OBJ): sshsha.c ssh.h
|
|
|
|
sshrand.$(OBJ): sshrand.c ssh.h
|
|
|
|
sshblowf.$(OBJ): sshblowf.c ssh.h
|
|
|
|
scp.$(OBJ): scp.c putty.h scp.h
|
|
|
|
scpssh.$(OBJ): scpssh.c putty.h ssh.h scp.h
|
|
|
|
version.$(OBJ): version.c
|
|
|
|
##--
|
1999-02-09 15:18:34 +00:00
|
|
|
|
|
|
|
# Hack to force version.obj to be rebuilt always
|
1999-12-13 17:21:42 +00:00
|
|
|
version.obj: versionpseudotarget
|
|
|
|
@echo (built version.obj)
|
1999-02-09 15:18:34 +00:00
|
|
|
versionpseudotarget:
|
|
|
|
cl $(FWHACK) $(VER) $(CFLAGS) /c version.c
|
1999-01-08 13:02:13 +00:00
|
|
|
|
1999-12-13 17:21:42 +00:00
|
|
|
##-- dependencies
|
|
|
|
win_res.$(RES): win_res.rc win_res.h putty.ico
|
|
|
|
##--
|
|
|
|
win_res.$(RES):
|
2000-01-19 12:16:19 +00:00
|
|
|
rc $(FWHACK) $(RCFL) -r -DWIN32 -D_WIN32 -DWINVER=0x0400 win_res.rc
|
1999-01-08 13:02:13 +00:00
|
|
|
|
1999-12-13 17:21:42 +00:00
|
|
|
##-- dependencies
|
|
|
|
scp.$(RES): scp.rc scp.ico
|
|
|
|
##--
|
|
|
|
scp.$(RES):
|
2000-01-19 12:16:19 +00:00
|
|
|
rc $(FWHACK) $(RCFL) -r -DWIN32 -D_WIN32 -DWINVER=0x0400 scp.rc
|
1999-09-03 15:12:04 +00:00
|
|
|
|
1999-01-08 13:02:13 +00:00
|
|
|
clean:
|
|
|
|
del *.obj
|
|
|
|
del *.exe
|
|
|
|
del *.res
|
|
|
|
del *.pch
|
|
|
|
del *.aps
|
|
|
|
del *.ilk
|
|
|
|
del *.pdb
|
1999-02-09 15:18:34 +00:00
|
|
|
del *.rsp
|