Create settings.c and move the load/save session code out of
[u/mdw/putty] / Makefile
index 37d881e..731cf5d 100644 (file)
--- a/Makefile
+++ b/Makefile
 #      Generates executables whose About box report them as being a
 #      release version.
 #
-#  - COMPAT=/DWIN32S_COMPAT
-#      Generates a binary that works (minimally) with Win32s.
+#  - COMPAT=/DAUTO_WINSOCK
+#      Causes PuTTY to assume that <windows.h> includes its own WinSock
+#      header file, so that it won't try to include <winsock.h>.
+#
+#  - COMPAT=/DWINSOCK_TWO
+#      Causes the PuTTY utilities to include <winsock2.h> instead of
+#      <winsock.h>, except Plink which _needs_ WinSock 2 so it already
+#      does this.
 #
 #  - RCFL=/DASCIICTLS
 #      Uses ASCII rather than Unicode to specify the tab control in
@@ -54,11 +60,11 @@ POBJS = be_all.$(OBJ)
 ##-- objects puttytel
 TOBJS = be_nossh.$(OBJ)
 ##-- objects plink
-PLOBJS = plink.$(OBJ) windlg.$(OBJ)
+PLOBJS = plink.$(OBJ)
 ##-- objects pscp
-SOBJS = scp.$(OBJ) windlg.$(OBJ) be_none.$(OBJ)
+SOBJS = scp.$(OBJ) be_none.$(OBJ)
 ##-- objects putty puttytel pscp plink
-MOBJS = misc.$(OBJ) version.$(OBJ)
+MOBJS = misc.$(OBJ) version.$(OBJ) winstore.$(OBJ) settings.$(OBJ)
 ##-- objects putty pscp plink
 OBJS1 = sshcrc.$(OBJ) sshdes.$(OBJ) sshmd5.$(OBJ) sshrsa.$(OBJ) sshrand.$(OBJ)
 OBJS2 = sshsha.$(OBJ) sshblowf.$(OBJ) noise.$(OBJ) sshdh.$(OBJ) sshdss.$(OBJ)
@@ -66,10 +72,8 @@ OBJS3 = sshbn.$(OBJ) sshpubk.$(OBJ) ssh.$(OBJ) pageantc.$(OBJ) tree234.$(OBJ)
 ##-- objects pageant
 PAGE1 = pageant.$(OBJ) sshrsa.$(OBJ) sshpubk.$(OBJ) sshdes.$(OBJ) sshbn.$(OBJ)
 PAGE2 = sshmd5.$(OBJ) version.$(OBJ) tree234.$(OBJ)
-##-- resources putty
+##-- resources putty puttytel
 PRESRC = win_res.$(RES)
-##-- resources puttytel
-TRESRC = nosshres.$(RES)
 ##-- resources pageant
 PAGERC = pageant.$(RES)
 ##-- resources pscp
@@ -98,7 +102,7 @@ all: putty.exe puttytel.exe pscp.exe plink.exe pageant.exe
 putty.exe: $(GOBJS1) $(GOBJS2) $(LOBJS1) $(POBJS) $(MOBJS) $(OBJS1) $(OBJS2) $(OBJS3) $(PRESRC) putty.rsp
        link $(LFLAGS) -out:putty.exe @putty.rsp
 
-puttytel.exe: $(GOBJS1) $(GOBJS2) $(LOBJS1) $(TOBJS) $(MOBJS) $(TRESRC) puttytel.rsp
+puttytel.exe: $(GOBJS1) $(GOBJS2) $(LOBJS1) $(TOBJS) $(MOBJS) $(PRESRC) puttytel.rsp
        link $(LFLAGS) -out:puttytel.exe @puttytel.rsp
 
 pageant.exe: $(PAGE1) $(PAGE2) $(PAGERC) pageant.rsp
@@ -132,7 +136,7 @@ puttytel.rsp: makefile
        echo $(LOBJS1) >> puttytel.rsp
        echo $(TOBJS) >> puttytel.rsp
        echo $(MOBJS) >> puttytel.rsp
-       echo $(TRESRC) >> puttytel.rsp
+       echo $(PRESRC) >> puttytel.rsp
        echo $(LIBS1) >> puttytel.rsp
        echo $(LIBS2) >> puttytel.rsp
        echo $(SOCK1) >> puttytel.rsp
@@ -173,8 +177,10 @@ plink.rsp: makefile
        echo $(SOCK2) >> plink.rsp
 
 ##-- dependencies
-window.$(OBJ): window.c putty.h win_res.h
+window.$(OBJ): window.c putty.h win_res.h storage.h
 windlg.$(OBJ): windlg.c putty.h ssh.h win_res.h
+settings.$(OBJ): settings.c putty.h storage.h
+winstore.$(OBJ): winstore.c putty.h storage.h
 terminal.$(OBJ): terminal.c putty.h
 sizetip.$(OBJ): sizetip.c putty.h
 telnet.$(OBJ): telnet.c putty.h
@@ -182,7 +188,7 @@ 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
+noise.$(OBJ): noise.c putty.h ssh.h storage.h
 ssh.$(OBJ): ssh.c ssh.h putty.h tree234.h
 sshcrc.$(OBJ): sshcrc.c ssh.h
 sshdes.$(OBJ): sshdes.c ssh.h
@@ -195,7 +201,7 @@ sshdh.$(OBJ): sshdh.c ssh.h
 sshdss.$(OBJ): sshdss.c ssh.h
 sshbn.$(OBJ): sshbn.c ssh.h
 sshpubk.$(OBJ): sshpubk.c ssh.h
-scp.$(OBJ): scp.c putty.h scp.h
+scp.$(OBJ): scp.c putty.h
 version.$(OBJ): version.c
 be_all.$(OBJ): be_all.c
 be_nossh.$(OBJ): be_nossh.c
@@ -218,12 +224,6 @@ win_res.$(RES):
        rc $(FWHACK) $(RCFL) -r -DWIN32 -D_WIN32 -DWINVER=0x0400 win_res.rc
 
 ##-- dependencies
-nosshres.$(RES): nosshres.rc win_res.rc win_res.h putty.ico
-##--
-nosshres.$(RES):
-       rc $(FWHACK) $(RCFL) -r -DWIN32 -D_WIN32 -DWINVER=0x0400 nosshres.rc
-
-##-- dependencies
 scp.$(RES): scp.rc scp.ico
 ##--
 scp.$(RES):