Using plink with CVS - need to make sure the saved session uses SSH
[sgt/putty] / Makefile
index a4ec172..3ce617c 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -33,6 +33,9 @@
 #      Cygnus/mingw32, whose resource compiler may have less of a
 #      problem with it.
 #
+#  - XFLAGS=/DDEBUG
+#      Causes PuTTY to enable internal debugging.
+#
 #  - XFLAGS=/DMALLOC_LOG
 #      Causes PuTTY to emit a file called putty_mem.log, logging every
 #      memory allocation and free, so you can track memory leaks.
 #
 ##--
 
-CFLAGS = /nologo /W3 /YX /O2 /Yd /D_WINDOWS /DDEBUG /ML /Fd
+# Enable debug and incremental linking and compiling
+# CFLAGS = /nologo /W3 /YX /Yd /O1 /Gi /D_WINDOWS /DDEBUG
 # LFLAGS = /debug
 
-# Use MSVC DLL
-# CFLAGS = /nologo /W3 /YX /O2 /Yd /D_WINDOWS /DDEBUG /MD /Fd
+# Disable debug and incremental linking and compiling
+CFLAGS = /nologo /W3 /O1 /D_WINDOWS
+LFLAGS = /incremental:no /fixed
 
-# Disable debug and incremental linking
-LFLAGS = /incremental:no
+# Use MSVC DLL
+# CFLAGS = /nologo /W3 /O1 /MD /D_WINDOWS
+# LFLAGS = /incremental:no
 
 .c.obj:
        cl $(COMPAT) $(FWHACK) $(XFLAGS) $(CFLAGS) /c $*.c
@@ -87,6 +93,7 @@ OBJS4 = x11fwd.$(OBJ) sshaes.$(OBJ)
 ##-- objects pageant
 PAGE1 = pageant.$(OBJ) sshrsa.$(OBJ) sshpubk.$(OBJ) sshdes.$(OBJ) sshbn.$(OBJ)
 PAGE2 = sshmd5.$(OBJ) version.$(OBJ) tree234.$(OBJ) misc.$(OBJ) sshaes.$(OBJ)
+PAGE3 = sshsha.$(OBJ) pageantc.$(OBJ)
 ##-- objects puttygen
 GEN1 = puttygen.$(OBJ) sshrsag.$(OBJ) sshprime.$(OBJ) sshdes.$(OBJ)
 GEN2 = sshbn.$(OBJ) sshmd5.$(OBJ) version.$(OBJ) sshrand.$(OBJ) noise.$(OBJ)
@@ -117,7 +124,7 @@ LRESRC = plink.$(RES)
 
 LIBS1 = advapi32.lib user32.lib gdi32.lib
 LIBS2 = comctl32.lib comdlg32.lib
-LIBS3 = shell32.lib
+LIBS3 = shell32.lib winmm.lib
 SOCK1 = wsock32.lib
 SOCK2 = ws2_32.lib
 
@@ -130,7 +137,7 @@ putty.exe: $(GOBJS1) $(GOBJS2) $(LOBJS1) $(POBJS) $(MOBJS) $(MOBJ2) $(OBJS1) $(O
 puttytel.exe: $(GOBJS1) $(GOBJS2) $(LOBJS1) $(TOBJS) $(MOBJS) $(MOBJ2) $(PRESRC) puttytel.rsp
        link $(LFLAGS) -out:puttytel.exe -map:puttytel.map @puttytel.rsp
 
-pageant.exe: $(PAGE1) $(PAGE2) $(PAGERC) pageant.rsp
+pageant.exe: $(PAGE1) $(PAGE2) $(PAGE3) $(PAGERC) pageant.rsp
        link $(LFLAGS) -out:pageant.exe -map:pageant.map @pageant.rsp
 
 puttygen.exe: $(GEN1) $(GEN2) $(GEN3) $(GEN4) $(GENRC) puttygen.rsp
@@ -145,6 +152,9 @@ psftp.exe: $(FOBJS) $(MOBJS) $(MOBJ2) $(OBJS1) $(OBJS2) $(OBJS3) $(OBJS4) $(SRES
 plink.exe: $(LOBJS1) $(POBJS) $(PLOBJS) $(MOBJS) $(MOBJ2) $(OBJS1) $(OBJS2) $(OBJS3) $(OBJS4) $(LRESRC) plink.rsp
        link $(LFLAGS) -out:plink.exe -map:plink.map @plink.rsp
 
+ssh.obj:
+       cl $(FWHACK) $(VER) $(CFLAGS) /Gi- /c ssh.c
+
 putty.rsp: makefile
        echo /nologo /subsystem:windows > putty.rsp
        echo $(GOBJS1) >> putty.rsp
@@ -160,6 +170,7 @@ putty.rsp: makefile
        echo $(PRESRC) >> putty.rsp
        echo $(LIBS1) >> putty.rsp
        echo $(LIBS2) >> putty.rsp
+       echo $(LIBS3) >> putty.rsp
        echo $(SOCK1) >> putty.rsp
 
 puttytel.rsp: makefile
@@ -173,12 +184,14 @@ puttytel.rsp: makefile
        echo $(PRESRC) >> puttytel.rsp
        echo $(LIBS1) >> puttytel.rsp
        echo $(LIBS2) >> puttytel.rsp
+       echo $(LIBS3) >> puttytel.rsp
        echo $(SOCK1) >> puttytel.rsp
 
 pageant.rsp: makefile
        echo /nologo /subsystem:windows > pageant.rsp
        echo $(PAGE1) >> pageant.rsp
        echo $(PAGE2) >> pageant.rsp
+       echo $(PAGE3) >> pageant.rsp
        echo $(PAGERC) >> pageant.rsp
        echo $(LIBS1) >> pageant.rsp
        echo $(LIBS2) >> pageant.rsp
@@ -281,12 +294,11 @@ puttygen.$(OBJ): puttygen.c putty.h ssh.h winstuff.h
 psftp.$(OBJ): psftp.c putty.h ssh.h storage.h sftp.h int64.h
 sftp.$(OBJ): sftp.c sftp.h int64.h
 int64.$(OBJ): int64.c int64.h
+x11fwd.$(OBJ): x11fwd.c putty.h network.h puttymem.h ssh.h
 ##--
 
 # Hack to force version.obj to be rebuilt always
-version.obj: versionpseudotarget
-       @echo (built version.obj)
-versionpseudotarget:
+version.obj: *.c *.h *.rc
        cl $(FWHACK) $(VER) $(CFLAGS) /c version.c
 
 ##-- dependencies
@@ -314,19 +326,21 @@ puttygen.$(RES):
        rc $(FWHACK) $(RCFL) -r -DWIN32 -D_WIN32 -DWINVER=0x0400 puttygen.rc
 
 clean: tidy
-       del *.exe
+       -del *.exe
 
 tidy:
-       del *.obj
-       del *.res
-       del *.pch
-       del *.aps
-       del *.ilk
-       del *.pdb
-       del *.rsp
-       del *.dsp
-       del *.dsw
-       del *.ncb
-       del *.opt
-       del *.plg
-       del *.map
+       -del *.obj
+       -del *.res
+       -del *.pch
+       -del *.aps
+       -del *.ilk
+       -del *.pdb
+       -del *.rsp
+       -del *.dsp
+       -del *.dsw
+       -del *.ncb
+       -del *.opt
+       -del *.plg
+       -del *.map
+       -del *.idb
+       -del debug.log