-# $Id$
+# $Id: Makefile 8654 2011-05-23 08:39:50Z marta $
#
# Top level makefile for building ipfw kernel and userspace.
# You can run it manually or also under the Planetlab build.
--exclude tcc-0.9.25-bsd \
--exclude original_passthru \
--exclude ipfw3.diff --exclude add_rules \
+ --exclude test --exclude test_ \
ipfw3 )
bindist:
@echo "and commit with:"
@echo "(cd /tmp/pl-tmp/pl/trunk; svn ci -m 'Update from the mail ipfw repo.')"
+openwrt_release:
+ # create a temporary directory
+ $(eval TMPDIR := $(shell mktemp -d -p /tmp/ ipfw3_openwrt_XXXXX))
+ # create the source destination directory
+ $(eval IPFWDIR := ipfw3-$(DATE))
+ $(eval DSTDIR := $(TMPDIR)/$(IPFWDIR))
+ mkdir $(DSTDIR)
+ # copy the package, clean objects and svn info
+ cp -r ./ipfw ./dummynet2 glue.h Makefile ./configuration README $(DSTDIR)
+ (cd $(DSTDIR); make -s distclean; find . -name .svn | xargs rm -rf)
+ (cd $(TMPDIR); tar czf $(IPFWDIR).tar.gz $(IPFWDIR))
+
+ # create the port files in /tmp/ipfw3-port
+ $(eval PORTDIR := $(TMPDIR)/ipfw3)
+ mkdir -p $(PORTDIR)/patches
+ # generate the Makefile, PKG_VERSION and PKG_MD5SUM
+ md5sum $(DSTDIR).tar.gz | cut -d ' ' -f 1 > $(TMPDIR)/md5sum
+ cat ./OPENWRT/Makefile | \
+ sed s/PKG_VERSION:=/PKG_VERSION:=$(DATE)/ | \
+ sed s/PKG_MD5SUM:=/PKG_MD5SUM:=`cat $(TMPDIR)/md5sum`/ \
+ > $(PORTDIR)/Makefile
+
+ @echo ""
+ @echo "The openwrt port is in $(TMPDIR)/ipfw3-port"
+ @echo "The source file should be copied to the public server:"
+ @echo "scp $(DSTDIR).tar.gz marta@info.iet.unipi.it:~marta/public_html/dummynet"
+ @echo "after this the temporary directory $(TMPDIR) can be removed."
+
install: