From 175f64177743e5a417e98d483ef995bf7151f3bc Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Fri, 24 Mar 2000 09:32:20 +0000 Subject: libiptc caching to speed up find_label(). Makefile distrib target for userspace. --- Makefile | 34 +++++++++++++++++++++++++++++++--- 1 file changed, 31 insertions(+), 3 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 6090e4f8..e142db46 100644 --- a/Makefile +++ b/Makefile @@ -4,14 +4,15 @@ TOPLEVEL_INCLUDED=YES ifndef KERNEL_DIR KERNEL_DIR=/usr/src/linux endif -NETFILTER_VERSION:=1.0.0alpha +NETFILTER_VERSION:=1.0.0beta +OLD_NETFILTER_VERSION:=1.0.0alpha LIBDIR:=/usr/local/lib BINDIR:=/usr/local/bin MANDIR:=/usr/local/man -COPT_FLAGS:=-O -CFLAGS:=$(COPT_FLAGS) -Wall -Wunused -Iinclude/ -I$(KERNEL_DIR)/include -DNETFILTER_VERSION=\"$(NETFILTER_VERSION)\" -g +COPT_FLAGS:=-O2 +CFLAGS:=$(COPT_FLAGS) -Wall -Wunused -Iinclude/ -I$(KERNEL_DIR)/include -DNETFILTER_VERSION=\"$(NETFILTER_VERSION)\" #-g -pg DEPFILES := $(SHARED_LIBS:%.so=%.d) SH_CFLAGS:=$(CFLAGS) -fPIC @@ -59,6 +60,33 @@ EXTRA_DEPENDS+=iptables-standalone.d iptables.d iptables-standalone.d iptables.d: %.d: %.c @-$(CC) -M -MG $(CFLAGS) $< | sed -e 's@^.*\.o:@$*.d $*.o:@' > $@ + +# Rusty's distro magic. +distrib: check nowhitespace distclean delrelease /home/public/netfilter/iptables-$(NETFILTER_VERSION).tar.bz2 diff md5sums + +# Makefile must not define: +# -g -pg +check: + @if echo $(CFLAGS) | egrep 'DEBUG|-g|-pg' >/dev/null; then echo Remove debugging flags; exit 1; else exit 0; fi + +nowhitespace: + @if grep -n ' $$' `find . -name 'Makefile' -o -name '*.[ch]'`; then exit 1; else exit 0; fi + +delrelease: + rm -f /home/public/netfilter/iptables-$(NETFILTER_VERSION).tar.bz2 + +/home/public/netfilter/iptables-$(NETFILTER_VERSION).tar.bz2: + cd .. && ln -sf userspace iptables-$(NETFILTER_VERSION) && tar cvf - --exclude CVS --exclude iptables-$(NETFILTER_VERSION)/. | bzip2 -9 > $@ && rm iptables-$(NETFILTER_VERSION) + +diff: /home/public/netfilter/iptables-$(NETFILTER_VERSION).tar.bz2 + @mkdir /tmp/diffdir + @cd /tmp/diffdir && tar xfI /home/public/netfilter/iptables-$(NETFILTER_VERSION).tar.bz2 + @set -e; cd /tmp/diffdir; tar xfI /home/public/netfilter/iptables-$(OLD_NETFILTER_VERSION).tar.bz2; echo Creating patch-iptables-$(OLD_NETFILTER_VERSION)-$(NETFILTER_VERSION).bz2; diff -urN iptables-$(OLD_NETFILTER_VERSION) iptables-$(NETFILTER_VERSION) | bzip2 -9 > /home/public/netfilter/patch-iptables-$(OLD_NETFILTER_VERSION)-$(NETFILTER_VERSION).bz2 + @rm -rf /tmp/diffdir + +md5sums: + cd /home/public/netfilter/ && md5sum patch-iptables-*-$(NETFILTER_VERSION).bz2 iptables-$(NETFILTER_VERSION).tar.bz2 + # $(wildcard) fails wierdly with make v.3.78.1. include $(shell echo */Makefile) include Rules.make -- cgit v1.2.3