summaryrefslogtreecommitdiffstats
path: root/kernel/Makefile.in
blob: 8a89791a4409df17d3220141e18bacc21ae2b4ef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# $Id$
#
# This file is part of seppl.
#
# seppl is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# seppl is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with seppl; if not, write to the Free Software Foundation,
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.

# This Makefile is NOT created by automake!

KERNELDIR=@KERNELDIR@
SEPPL_MODDIR=@KERNELMODDIR@/seppl
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)

ifneq ($(KERNELRELEASE),)

EXTRA_CFLAGS += -DPACKAGE_BUGREPORT="\"@PACKAGE_BUGREPORT@\"" -DPACKAGE_VERSION="\"@PACKAGE_VERSION@\""
obj-m := seppl.o ipt_CRYPT.o ipt_DECRYPT.o

else

PWD := $(shell pwd)

all:
	$(MAKE) -C $(KERNELDIR) SUBDIRS=$(PWD) MODVERDIR=$(PWD) modules

load:
	insmod ./seppl.ko
	insmod ./ipt_CRYPT.ko
	insmod ./ipt_DECRYPT.ko

unload:
	-rmmod ./ipt_DECRYPT.ko
	-rmmod ./ipt_CRYPT.ko
	-rmmod ./seppl.ko

clean:
	rm -f *.o *.ko *.mod *.mod.c .*.cmd

Makefile: Makefile.in
	cd .. && ./config.status kernel/Makefile

install: all
	mkdir -p $(SEPPL_MODDIR)
	install -m644 seppl.ko ipt_CRYPT.ko ipt_DECRYPT.ko $(SEPPL_MODDIR)

distdir: 
	mkdir -p $(distdir)
	cp -p $(DISTFILES) $(distdir)

mostlyclean: clean
distclean: clean

maintainer-clean: clean
	rm -f Makefile

.PHONY: all clean maintainer-clean mostlyclean distclean distdir install

endif