diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2011-11-10 07:53:52 +0100 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2011-11-10 07:53:52 +0100 |
commit | a95082117ad4813141f5733e5c3dda8efc5dec16 (patch) | |
tree | 61edab08d7390e0179fc6c2900234c040168500a /Makefile | |
parent | c25768e4311eaf9e9d9166e42fe74e9c597c466d (diff) | |
download | NPTv6-a95082117ad4813141f5733e5c3dda8efc5dec16.tar NPTv6-a95082117ad4813141f5733e5c3dda8efc5dec16.zip |
Make this work again.
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 33 |
1 files changed, 18 insertions, 15 deletions
@@ -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 |