summaryrefslogtreecommitdiffstats
path: root/kernel/Makefile.in
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/Makefile.in')
-rw-r--r--kernel/Makefile.in49
1 files changed, 23 insertions, 26 deletions
diff --git a/kernel/Makefile.in b/kernel/Makefile.in
index 0d6d325..8a89791 100644
--- a/kernel/Makefile.in
+++ b/kernel/Makefile.in
@@ -24,40 +24,38 @@ PACKAGE=@PACKAGE@
VERSION=@VERSION@
DISTFILES=seppl.c seppl.h ipt_CRYPT.c ipt_CRYPT.h ipt_DECRYPT.c ipt_DECRYPT.h test.sh Makefile.in seppl_protocol.h
distdir = ../$(PACKAGE)-$(VERSION)
-CFLAGS=-Wall -g -O2
-KERNEL_CFLAGS= -I$(KERNELDIR)/include -DLINUX -DMODULE -D__KERNEL__ -DEXPORT_SYMTAB -DPACKAGE_BUGREPORT="\"@PACKAGE_BUGREPORT@\"" -DPACKAGE_VERSION="\"@PACKAGE_VERSION@\""
-include $(KERNELDIR)/.config
+ifneq ($(KERNELRELEASE),)
-all: Makefile ipt_CRYPT.o ipt_DECRYPT.o seppl.o
-
-Makefile: Makefile.in
- cd .. && ./config.status kernel/Makefile
+EXTRA_CFLAGS += -DPACKAGE_BUGREPORT="\"@PACKAGE_BUGREPORT@\"" -DPACKAGE_VERSION="\"@PACKAGE_VERSION@\""
+obj-m := seppl.o ipt_CRYPT.o ipt_DECRYPT.o
+else
-ifdef CONFIG_MODVERSIONS
-seppl.o ipt_CRYPT.o ipt_DECRYPT.o: seppl.ver
-endif
+PWD := $(shell pwd)
-ifndef GENKSYMS
-GENKSYMS=genksyms
-endif
+all:
+ $(MAKE) -C $(KERNELDIR) SUBDIRS=$(PWD) MODVERDIR=$(PWD) modules
-ipt_CRYPT.o: ipt_CRYPT.c
- $(CC) $(CFLAGS) -c $< -o $@ $(KERNEL_CFLAGS)
+load:
+ insmod ./seppl.ko
+ insmod ./ipt_CRYPT.ko
+ insmod ./ipt_DECRYPT.ko
-ipt_DECRYPT.o: ipt_DECRYPT.c
- $(CC) $(CFLAGS) -c $< -o $@ $(KERNEL_CFLAGS)
+unload:
+ -rmmod ./ipt_DECRYPT.ko
+ -rmmod ./ipt_CRYPT.ko
+ -rmmod ./seppl.ko
-seppl.o: seppl.c
- $(CC) $(CFLAGS) -c $< -o $@ $(KERNEL_CFLAGS)
+clean:
+ rm -f *.o *.ko *.mod *.mod.c .*.cmd
-seppl.ver: seppl.c
- $(CC) $(CFLAGS) $(KERNEL_CFLAGS) -E -D__GENKSYMS__ $^ | $(GENKSYMS) -k `uname -r`> $@
+Makefile: Makefile.in
+ cd .. && ./config.status kernel/Makefile
-install:
+install: all
mkdir -p $(SEPPL_MODDIR)
- install -m644 seppl.o ipt_CRYPT.o ipt_DECRYPT.o $(SEPPL_MODDIR)
+ install -m644 seppl.ko ipt_CRYPT.ko ipt_DECRYPT.ko $(SEPPL_MODDIR)
distdir:
mkdir -p $(distdir)
@@ -69,7 +67,6 @@ distclean: clean
maintainer-clean: clean
rm -f Makefile
-clean:
- rm -f *.o *.ver
-
.PHONY: all clean maintainer-clean mostlyclean distclean distdir install
+
+endif