From b1eb3639064583758c56a98850b4efec5e9fc165 Mon Sep 17 00:00:00 2001 From: Jozsef Kadlecsik Date: Wed, 19 Aug 2009 12:14:12 +0200 Subject: New 'release' target to make life simpler --- Makefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index eae8b20..d663f92 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,7 @@ ###################################################################### ifndef KERNEL_DIR -KERNEL_DIR=/usr/src/linux +KERNEL_DIR=/lib/modules/`uname -r`/build endif ifndef KBUILD_OUTPUT KBUILD_OUTPUT=$(KERNEL_DIR) @@ -105,6 +105,11 @@ clean: $(EXTRA_CLEANS) rm -rf $(PROGRAMS) $(SHARED_LIBS) *.o *~ tests/*~ [ -f $(KERNEL_DIR)/net/ipv4/netfilter/Config.in ] || (cd kernel; make -C $(KERNEL_DIR) M=`pwd` clean) +release: clean + cp -a . /tmp/ipset-$(IPSET_VERSION) + tar cjf ../ipset-$(IPSET_VERSION).tar.bz2 -C /tmp --exclude=.git ipset-$(IPSET_VERSION) + rm -rf /tmp/ipset-$(IPSET_VERSION) + #The ipset(8) self ipset.o: ipset.c ipset.h $(CC) $(CFLAGS) -DIPSET_VERSION=\"$(IPSET_VERSION)\" -DIPSET_LIB_DIR=\"$(IPSET_LIB_DIR)\" -c -o $@ $< -- cgit v1.2.3