summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2011-11-10 07:53:52 +0100
committerMatthias Schiffer <mschiffer@universe-factory.net>2011-11-10 07:53:52 +0100
commita95082117ad4813141f5733e5c3dda8efc5dec16 (patch)
tree61edab08d7390e0179fc6c2900234c040168500a /Makefile
parentc25768e4311eaf9e9d9166e42fe74e9c597c466d (diff)
downloadNPTv6-a95082117ad4813141f5733e5c3dda8efc5dec16.tar
NPTv6-a95082117ad4813141f5733e5c3dda8efc5dec16.zip
Make this work again.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile33
1 files changed, 18 insertions, 15 deletions
diff --git a/Makefile b/Makefile
index e5cc2f0..3122aad 100644
--- a/Makefile
+++ b/Makefile
@@ -1,30 +1,33 @@
-obj-m := ip6t_MAP66.o
+obj-m := ip6t_SNPTV6.o ip6t_DNPTV6.o
KVERSION := $(shell uname -r)
KPATH := /lib/modules/$(KVERSION)/build
-IPTABLES_VERSION := $(shell (/sbin/ip6tables --version 2>&- || ip6tables --version)|sed 's/^.*\([[:digit:]]\+\.[[:digit:]]\+\.[[:digit:]]\+\).*/\1/')
-IPTABLES_VERSION_CODE := $(shell echo $$(( $$(echo $(IPTABLES_VERSION)|sed 's/^.*\([[:digit:]]\+\)\.\([[:digit:]]\+\)\.\([[:digit:]]\+\).*/\1 * 65536 + \2 * 256 + \3/') )))
ifeq ($(DEBUG),1)
EXTRA_CFLAGS := -DDEBUG
endif
-all: libip6t_MAP66.so
+all: module libip6t_SNPTV6.so libip6t_DNPTV6.so
+
+module:
$(MAKE) -C $(KPATH) M=$(PWD) modules
-libip6t_MAP66.so: libip6t_MAP66.o
- gcc -shared -o $@ $<
+libip6t_SNPTV6.so: libip6t_SNPTV6.o libip6t_NPTV6.o
+ gcc -shared -o $@ $^
-libip6t_MAP66.o: libip6t_MAP66.c ip6t_MAP66.h Makefile
- gcc $(CFLAGS) -DIPTABLES_VERSION=\"$(IPTABLES_VERSION)\" -DIPTABLES_VERSION_CODE=$(IPTABLES_VERSION_CODE) -D_LARGEFILE_SOURCE=1 -D_LARGE_FILES -D_FILE_OFFSET_BITS=64 -D_REENTRANT -Werror -Wall -Waggregate-return -Wmissing-declarations -Wmissing-prototypes -Wredundant-decls -Wshadow -Winline -pipe -DXTABLES_LIBDIR=\"/usr/local/libexec/xtables\" -D_INIT=libip6t_MAP66_init -DPIC -fPIC -g -O2 -o $@ -c $<
+libip6t_DNPTV6.so: libip6t_DNPTV6.o libip6t_NPTV6.o
+ gcc -shared -o $@ $^
-clean:
- $(MAKE) -C /lib/modules/$(KVERSION)/build M=$(PWD) clean
- rm -f *.so
- rm -f *~
+libip6t_NPTV6.o: libip6t_NPTV6.c libip6t_NPTV6.h ip6t_NPTV6.h Makefile
+ gcc $(CFLAGS) -D_LARGEFILE_SOURCE=1 -D_LARGE_FILES -D_FILE_OFFSET_BITS=64 -D_REENTRANT -Werror -Wall -Waggregate-return -Wmissing-declarations -Wmissing-prototypes -Wredundant-decls -Wshadow -Winline -pipe -DXTABLES_LIBDIR=\"/usr/lib/iptables\" -DPIC -fPIC -g -O2 -o $@ -c $<
-install: /lib/xtables/libip6t_MAP66.so
+libip6t_SNPTV6.o: libip6t_SNPTV6.c libip6t_NPTV6.h ip6t_NPTV6.h Makefile
+ gcc $(CFLAGS) -D_LARGEFILE_SOURCE=1 -D_LARGE_FILES -D_FILE_OFFSET_BITS=64 -D_REENTRANT -Werror -Wall -Waggregate-return -Wmissing-declarations -Wmissing-prototypes -Wredundant-decls -Wshadow -Winline -pipe -DXTABLES_LIBDIR=\"/usr/lib/iptables\" -DPIC -fPIC -g -O2 -o $@ -c $<
-/lib/xtables/libip6t_MAP66.so: libip6t_MAP66.so
- cp $< $@
+libip6t_DNPTV6.o: libip6t_DNPTV6.c libip6t_NPTV6.h ip6t_NPTV6.h Makefile
+ gcc $(CFLAGS) -D_LARGEFILE_SOURCE=1 -D_LARGE_FILES -D_FILE_OFFSET_BITS=64 -D_REENTRANT -Werror -Wall -Waggregate-return -Wmissing-declarations -Wmissing-prototypes -Wredundant-decls -Wshadow -Winline -pipe -DXTABLES_LIBDIR=\"/usr/lib/iptables\" -DPIC -fPIC -g -O2 -o $@ -c $<
+
+clean:
+ $(MAKE) -C $(KPATH) M=$(PWD) clean
+ rm -f libip6t_SNPTV6.so libip6t_DNPTV6.so *.o
README.txt: README.dbk
xmlto text README.dbk