+# ------------------------------------------------------------
+# Additional text added verbatim to each individual Makefile.
+
+# Hack to force version.o to be rebuilt always.
+!begin vc
+version.obj: *.c *.h *.rc
+ cl $(VER) $(CFLAGS) /c ..\version.c
+!end
+!specialobj vc version
+!begin cygwin
+version.o: FORCE
+ $(CC) $(COMPAT) $(XFLAGS) $(CFLAGS) $(VER) -c ../version.c
+!end
+!specialobj cygwin version
+!begin borland
+version.obj: FORCE
+ bcc32 $(VER) $(CFLAGS) /c ..\version.c
+!end
+!specialobj borland version
+!begin lcc
+version.obj: FORCE
+ lcc $(VER) $(CFLAGS) /c ..\version.c
+!end
+!specialobj lcc version
+# For Unix, we also need the gross MD5 hack that causes automatic
+# version number selection in release source archives.
+!begin gtk
+version.o: FORCE
+ if test -z "$(VER)" && (cd ..; md5sum -c manifest); then \
+ $(CC) $(COMPAT) $(XFLAGS) $(CFLAGS) `cat ../version.def` -c ../version.c; \
+ else \
+ $(CC) $(COMPAT) $(XFLAGS) $(CFLAGS) $(VER) -c ../version.c; \
+ fi
+!end
+!specialobj gtk version
+
+# Add VER to Windows resource targets, and force them to be rebuilt every
+# time, on the assumption that they will contain version information.
+!begin vc vars
+RCFLAGS = $(RCFLAGS) $(VER)
+!end
+!begin cygwin vars
+# XXX GNU-ism, but it's probably all right for a Cygwin/MinGW Makfile.
+RCFLAGS += $(patsubst -D%,--define %,$(VER))
+!end
+!begin borland vars
+# Borland doesn't support +=. This probably shouldn't work, but seems to.
+RCFLAGS = $(RCFLAGS) $(VER)
+!end
+!begin lcc vars
+RCFLAGS += $(VER)
+!end
+!forceobj putty.res
+!forceobj puttytel.res
+!forceobj plink.res
+!forceobj pscp.res
+!forceobj psftp.res
+!forceobj pageant.res
+!forceobj puttygen.res
+
+# `make install' target for Unix.
+!begin gtk
+install:
+ $(INSTALL_PROGRAM) -m 755 plink $(DESTDIR)$(bindir)/plink
+ $(INSTALL_PROGRAM) -m 755 pscp $(DESTDIR)$(bindir)/pscp
+ $(INSTALL_PROGRAM) -m 755 psftp $(DESTDIR)$(bindir)/psftp
+ $(INSTALL_PROGRAM) -m 755 pterm $(DESTDIR)$(bindir)/pterm
+ if test -n "$(UTMP_GROUP)"; then \
+ chgrp $(UTMP_GROUP) $(DESTDIR)$(bindir)/pterm && \
+ chmod 2755 $(DESTDIR)$(bindir)/pterm; \
+ elif test -n "$(UTMP_USER)"; then \
+ chown $(UTMP_USER) $(DESTDIR)$(bindir)/pterm && \
+ chmod 4755 $(DESTDIR)$(bindir)/pterm; \
+ fi
+ $(INSTALL_PROGRAM) -m 755 putty $(DESTDIR)$(bindir)/putty
+ $(INSTALL_PROGRAM) -m 755 puttygen $(DESTDIR)$(bindir)/puttygen
+ $(INSTALL_PROGRAM) -m 755 puttytel $(DESTDIR)$(bindir)/puttytel
+ $(INSTALL_DATA) -m 644 ../doc/plink.1 $(DESTDIR)$(man1dir)/plink.1
+ $(INSTALL_DATA) -m 644 ../doc/pscp.1 $(DESTDIR)$(man1dir)/pscp.1
+ $(INSTALL_DATA) -m 644 ../doc/psftp.1 $(DESTDIR)$(man1dir)/psftp.1
+ $(INSTALL_DATA) -m 644 ../doc/pterm.1 $(DESTDIR)$(man1dir)/pterm.1
+ $(INSTALL_DATA) -m 644 ../doc/putty.1 $(DESTDIR)$(man1dir)/putty.1
+ $(INSTALL_DATA) -m 644 ../doc/puttygen.1 $(DESTDIR)$(man1dir)/puttygen.1
+ $(INSTALL_DATA) -m 644 ../doc/puttytel.1 $(DESTDIR)$(man1dir)/puttytel.1
+
+install-strip:
+ $(MAKE) install INSTALL_PROGRAM="$(INSTALL_PROGRAM) -s"
+!end
+!begin osx vars
+CFLAGS += -DMACOSX
+!end
+
+# ------------------------------------------------------------