--- /dev/null
+--- freeswan-1.97/Makefile Fri Apr 12 06:08:31 2002
++++ freeswan-1.97/Makefile.org Fri May 3 12:42:39 2002
+@@ -50,7 +50,8 @@
+ @false
+
+ # everything that's necessary to put Klips into the kernel
+-insert: patches klink klipsdefaults
++.NOTPARALLEL: myprecheck patches klink klipsdefaults
++insert: myprecheck patches klink klipsdefaults
+
+ # create KERNELKLIPS and populate it with symlinks to the sources
+ klink:
+@@ -214,6 +215,8 @@
+ POST=confcheck programs install kernel
+ MPOST=confcheck programs install module
+ RPOST=confcheck programs rpminstall module rpmkinstall rpms
++KMPOST=confcheck programs install kmodule
++
+ ogo: $(PRE) pcf $(POST)
+ oldgo: $(PRE) ocf $(POST)
+ menugo: $(PRE) mcf $(POST)
+@@ -227,6 +230,7 @@
+ oldrpm: $(PRE) ocf $(RPOST)
+ menurpm: $(PRE) mcf $(RPOST)
+ xrpm: $(PRE) xcf $(RPOST)
++modgo: $(PRE) ncf $(KMPOST)
+
+ # preliminaries
+ precheck:
+@@ -256,6 +260,11 @@
+ echo '*** please do that first; the results are necessary.' ; \
+ exit 1 ; \
+ fi
++myprecheck: myocf
++
++myocf: precheck
++ -cd $(KERNELSRC) ; yes "" | $(MAKE) oldconfig; $(MAKE) include/linux/version.h
++
+
+ # set version code if this is a fresh CVS checkout
+ verset:
+@@ -279,6 +288,16 @@
+ ocf:
+ -cd $(KERNELSRC) ; $(MAKE) $(KERNMAKEOPTS) oldconfig dep </dev/null >/dev/null
+
++
++ENTER := "M\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"
++ncf: insert
++ -cd $(KERNELSRC); echo -e $(ENTER) | $(MAKE) oldconfig
++
++ncf_k: ncf
++ -cd $(KERNELSRC); $(MAKE) dep kernel
++
++confcheck: ncf
++
+ rpm:
+ mkdir -p ${RPMKERNDIR}
+ rm -rf $(RPMTMPDIR)
+@@ -329,6 +348,24 @@
+ then set -x ; \
+ ( cd $(KERNELSRC) ; \
+ $(MAKE) $(KERNMAKEOPTS) modules 2>&1 ) | tee -a out.kbuild ; \
++
++ fi
++ utils/errcheck out.kbuild
++
++ # kernel building, with error checks
++ kmodule: confcheck
++ rm -f out.kbuild out.kinstall
++ cp -pf Makefile.ipsec $(KERNELSRC)/net/ipsec/
++ #( cd $(KERNELSRC) ; $(MAKE) dep kernel) 2>&1 | tee out.kbuild
++ @if egrep -q '^CONFIG_MODULES=y' $(KCFILE) ; \
++ then set -x ; \
++ ( cd $(KERNELSRC)/net/ipsec ; \
++ ln -sf ../../arch .; ln -sf ../../Rules.make .; cd ../..; \
++ $(MAKE) -C net/ipsec -f Makefile.ipsec 2>&1 ) | tee -a out.kbuild ; \
++ rm $(KERNELSRC)/net/ipsec/arch $(KERNELSRC)/net/ipsec/Rules.make; \
++ else \
++ echo "BUG: You have to enable modules!"; \
++ exit 1; \
+ fi
+ utils/errcheck out.kbuild
+
--- /dev/null
+--- freeswan-1.97/Makefile.module Fri May 3 13:06:04 2002
++++ freeswan-1.97/Makefile.module.org Fri May 3 12:51:46 2002
+@@ -0,0 +1,27 @@
++# Makefile for the ipsec (FreeS/WAN) module.
++# (c) Kloc Piotr <pioklo@pld.org.pl> ,2002-05-03, GNU GPL
++
++KDIR=linux
++TOPDIR=$(KDIR)
++
++default: module
++all: module
++modules: module
++
++module:
++ $(MAKE) -f Makefile kmodule
++
++install: install_mod
++
++install_mod:
++ ( cd $(KDIR)/net/ipsec; \
++ ln -sf ../../arch .; ln -sf ../../Rules.make .; cd ../..; \
++ $(MAKE) -C net/ipsec -f Makefile.ipsec ipsecmod_inst )
++ rm $(KDIR)/net/ipsec/arch $(KDIR)/net/ipsec/Rules.make
++ $(MAKE) -f Makefile unpatch
++ ( cd $(KDIR); rm -rf net/ipsec; yes "" | $(MAKE) oldconfig )
++
++clean:
++ $(MAKE) -f Makefile unpatch
++ rm -rf $(KDIR)/net/ipsec
++ (cd $(KDIR); yes "" | $(MAKE) oldconfig)
++
+--- freeswan-1.97/Makefile.ipsec Fri May 3 13:14:54 2002
++++ freeswan-1.97/Makefile.ipsec.org Fri May 3 13:14:43 2002
+@@ -0,0 +1,36 @@
++# Makefile for the ipsec (FreeS/WAN) driver
++# (w) 5/2002, pioklo@pld.org.pl
++
++KDIR := linux
++TOPDIR := $(KDIR)
++
++TARGET = ipsec.o
++
++default: $(TARGET)
++
++TOPDIR := $(KDIR)
++include $(KDIR)/.config
++include $(KDIR)/Makefile
++TOPDIR := $(KDIR)
++
++CFLAGS := -I$(KDIR)/include $(CFLAGS) -DMODULE
++ifdef CONFIG_MODVERSIONS
++CFLAGS += -DMODVERSIONS -include $(KDIR)/include/linux/modversions.h
++endif
++
++include Makefile
++
++ifndef MODLIB
++MODLIB = $(INSTALL_MOD_PATH)/lib/modules/$(KERNELRELEASE)
++endif
++
++ifeq ($(PATCHLEVEL),2)
++MODSUB := misc
++else
++MODSUB := kernel/misc
++endif
++
++ipsecmod_inst:
++ install -o root -g root -m 0755 -d $(MODLIB)/$(MODSUB)
++ install -o root -g root -m 0644 ipsec.o $(MODLIB)/$(MODSUB)/
++