From a95082117ad4813141f5733e5c3dda8efc5dec16 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Thu, 10 Nov 2011 07:53:52 +0100 Subject: Make this work again. --- Makefile | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) (limited to 'Makefile') 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 -- cgit v1.2.3