Harald Welte | 3efb6ea | 2001-08-06 18:50:21 +0000 | [diff] [blame] | 1 | # uncomment this to get a fully statically linked version |
| 2 | # NO_SHARED_LIBS = 1 |
| 3 | |
Harald Welte | 2354d92 | 2003-03-04 23:15:42 +0000 | [diff] [blame] | 4 | # uncomment this to disable IPv6 support |
| 5 | # DO_IPV6 = 0 |
| 6 | |
Harald Welte | 3a5026f | 2001-09-02 16:07:33 +0000 | [diff] [blame] | 7 | ###################################################################### |
| 8 | # YOU SHOULD NOT NEED TO TOUCH ANYTHING BELOW THIS LINE |
| 9 | ###################################################################### |
| 10 | |
| 11 | # Standard part of Makefile for topdir. |
| 12 | TOPLEVEL_INCLUDED=YES |
| 13 | |
Marc Boucher | e6869a8 | 2000-03-20 06:03:29 +0000 | [diff] [blame] | 14 | ifndef KERNEL_DIR |
| 15 | KERNEL_DIR=/usr/src/linux |
| 16 | endif |
Harald Welte | 0c20bbf | 2004-04-15 09:33:07 +0000 | [diff] [blame] | 17 | IPTABLES_VERSION:=1.2.10 |
| 18 | OLD_IPTABLES_VERSION:=1.2.9 |
Marc Boucher | e6869a8 | 2000-03-20 06:03:29 +0000 | [diff] [blame] | 19 | |
Harald Welte | ba6d012 | 2002-02-17 19:49:26 +0000 | [diff] [blame] | 20 | PREFIX:=/usr/local |
| 21 | LIBDIR:=$(PREFIX)/lib |
| 22 | BINDIR:=$(PREFIX)/sbin |
| 23 | MANDIR:=$(PREFIX)/man |
| 24 | INCDIR:=$(PREFIX)/include |
Marc Boucher | e6869a8 | 2000-03-20 06:03:29 +0000 | [diff] [blame] | 25 | |
Harald Welte | 3a5026f | 2001-09-02 16:07:33 +0000 | [diff] [blame] | 26 | # directory for new iptables releases |
| 27 | RELEASE_DIR:=/tmp |
| 28 | |
Rusty Russell | 209820b | 2001-01-08 08:14:33 +0000 | [diff] [blame] | 29 | # Need libc6 for this. FIXME: Should covert to autoconf. |
Rusty Russell | 4d2afbf | 2001-05-01 02:06:08 +0000 | [diff] [blame] | 30 | ifeq ($(shell [ -f /usr/include/netinet/ip6.h ] && echo YES), YES) |
Harald Welte | 2354d92 | 2003-03-04 23:15:42 +0000 | [diff] [blame] | 31 | DO_IPV6:=1 |
Rusty Russell | 8e07bd7 | 2000-12-19 03:11:00 +0000 | [diff] [blame] | 32 | endif |
| 33 | |
Harald Welte | 380ba5f | 2002-02-13 16:19:55 +0000 | [diff] [blame] | 34 | COPT_FLAGS:=-O2 |
Harald Welte | 80fe35d | 2002-05-29 13:08:15 +0000 | [diff] [blame] | 35 | CFLAGS:=$(COPT_FLAGS) -Wall -Wunused -I$(KERNEL_DIR)/include -Iinclude/ -DIPTABLES_VERSION=\"$(IPTABLES_VERSION)\" #-g -DDEBUG #-pg # -DIPTC_DEBUG |
Marc Boucher | e6869a8 | 2000-03-20 06:03:29 +0000 | [diff] [blame] | 36 | |
Harald Welte | 3efb6ea | 2001-08-06 18:50:21 +0000 | [diff] [blame] | 37 | ifdef NO_SHARED_LIBS |
| 38 | CFLAGS += -DNO_SHARED_LIBS=1 |
| 39 | endif |
| 40 | |
Henrik Nordstrom | c279413 | 2004-01-22 15:04:24 +0000 | [diff] [blame] | 41 | EXTRAS+=iptables iptables.o iptables.8 |
Rusty Russell | 01c4520 | 2001-01-07 06:50:31 +0000 | [diff] [blame] | 42 | EXTRA_INSTALLS+=$(DESTDIR)$(BINDIR)/iptables $(DESTDIR)$(MANDIR)/man8/iptables.8 |
| 43 | |
Harald Welte | eba774d | 2001-10-16 08:22:40 +0000 | [diff] [blame] | 44 | # No longer experimental. |
| 45 | EXTRAS+=iptables-save iptables-restore |
| 46 | EXTRA_INSTALLS+=$(DESTDIR)$(BINDIR)/iptables-save $(DESTDIR)$(BINDIR)/iptables-restore $(DESTDIR)$(MANDIR)/man8/iptables-restore.8 $(DESTDIR)$(MANDIR)/man8/iptables-save.8 |
Rusty Russell | 8e07bd7 | 2000-12-19 03:11:00 +0000 | [diff] [blame] | 47 | |
Harald Welte | 2354d92 | 2003-03-04 23:15:42 +0000 | [diff] [blame] | 48 | ifeq ($(DO_IPV6), 1) |
Henrik Nordstrom | c279413 | 2004-01-22 15:04:24 +0000 | [diff] [blame] | 49 | EXTRAS+=ip6tables ip6tables.o ip6tables.8 |
András Kis-Szabó | 0612943 | 2001-10-14 13:27:03 +0000 | [diff] [blame] | 50 | EXTRA_INSTALLS+=$(DESTDIR)$(BINDIR)/ip6tables $(DESTDIR)$(MANDIR)/man8/ip6tables.8 |
Harald Welte | 8a6831a | 2001-03-15 15:33:56 +0000 | [diff] [blame] | 51 | EXTRAS_EXP+=ip6tables-save ip6tables-restore |
Harald Welte | 46d4d0a | 2001-03-16 15:48:56 +0000 | [diff] [blame] | 52 | EXTRA_INSTALLS_EXP+=$(DESTDIR)$(BINDIR)/ip6tables-save $(DESTDIR)$(BINDIR)/ip6tables-restore # $(DESTDIR)$(MANDIR)/man8/iptables-restore.8 $(DESTDIR)$(MANDIR)/man8/iptables-save.8 $(DESTDIR)$(MANDIR)/man8/ip6tables-save.8 $(DESTDIR)$(MANDIR)/man8/ip6tables-restore.8 |
Rusty Russell | 8e07bd7 | 2000-12-19 03:11:00 +0000 | [diff] [blame] | 53 | endif |
Marc Boucher | e6869a8 | 2000-03-20 06:03:29 +0000 | [diff] [blame] | 54 | |
Rusty Russell | 09b9a41 | 2000-04-27 10:16:47 +0000 | [diff] [blame] | 55 | # Sparc64 hack |
| 56 | ifeq ($(shell uname -m),sparc64) |
Martin Josefsson | dc93fce | 2004-05-26 15:46:27 +0000 | [diff] [blame] | 57 | POINTERTEST:=1 |
| 58 | 32bituser := $(shell echo -e "\#include <stdio.h>\n\#if !defined(__sparcv9) && !defined(__arch64__) && !defined(_LP64)\nuserspace_is_32bit\n\#endif" | $(CC) $(CFLAGS) -E - | grep userspace_is_32bit) |
| 59 | ifdef 32bituser |
| 60 | # The kernel is 64-bit, even though userspace is 32. |
| 61 | CFLAGS+=-DIPT_MIN_ALIGN=8 -DKERNEL_64_USERSPACE_32 |
| 62 | else |
| 63 | EXT_LDFLAGS=-m elf64_sparc |
| 64 | endif |
Rusty Russell | 09b9a41 | 2000-04-27 10:16:47 +0000 | [diff] [blame] | 65 | endif |
| 66 | |
Martin Josefsson | dc93fce | 2004-05-26 15:46:27 +0000 | [diff] [blame] | 67 | # Alpha only has 64bit userspace and fails the test below |
| 68 | ifeq ($(shell uname -m), alpha) |
| 69 | POINTERTEST:=1 |
| 70 | endif |
| 71 | |
| 72 | # Generic test if arch wasn't found above |
| 73 | ifneq ($(POINTERTEST),1) |
| 74 | # Try to determine if kernel is 64bit and we are compiling for 32bit |
| 75 | ifeq ($(shell [ -a $(KERNEL_DIR)/include/asm ] && echo YES), YES) |
| 76 | 64bitkernel := $(shell echo -e "\#include <asm/types.h>\n\#if BITS_PER_LONG == 64\nkernel_is_64bits\n\#endif" | $(CC) $(CFLAGS) -D__KERNEL__ -E - | grep kernel_is_64bits) |
| 77 | ifdef 64bitkernel |
| 78 | 32bituser := $(shell echo -e "\#include <stdio.h>\n\#if !defined(__arch64__) && !defined(_LP64)\nuserspace_is_32bit\n\#endif" | $(CC) $(CFLAGS) -E - | grep userspace_is_32bit) |
| 79 | ifdef 32bituser |
| 80 | CFLAGS+=-DIPT_MIN_ALIGN=8 -DKERNEL_64_USERSPACE_32 |
| 81 | endif |
| 82 | endif |
| 83 | else |
| 84 | CFLAGS+=-D_UNKNOWN_KERNEL_POINTER_SIZE |
| 85 | endif |
Rusty Russell | da70715 | 2001-04-21 04:25:09 +0000 | [diff] [blame] | 86 | endif |
| 87 | |
Marc Boucher | e6869a8 | 2000-03-20 06:03:29 +0000 | [diff] [blame] | 88 | ifndef IPT_LIBDIR |
| 89 | IPT_LIBDIR:=$(LIBDIR)/iptables |
| 90 | endif |
| 91 | |
Martin Josefsson | dc93fce | 2004-05-26 15:46:27 +0000 | [diff] [blame] | 92 | ifndef NO_SHARED_LIBS |
| 93 | DEPFILES = $(SHARED_LIBS:%.so=%.d) |
| 94 | SH_CFLAGS:=$(CFLAGS) -fPIC |
| 95 | STATIC_LIBS = |
| 96 | STATIC6_LIBS = |
| 97 | LDFLAGS = -rdynamic |
| 98 | LDLIBS = -ldl -lnsl |
| 99 | else |
| 100 | DEPFILES = $(EXT_OBJS:%.o=%.d) |
| 101 | STATIC_LIBS = extensions/libext.a |
| 102 | STATIC6_LIBS = extensions/libext6.a |
| 103 | LDFLAGS = -static |
| 104 | LDLIBS = |
| 105 | endif |
| 106 | |
Harald Welte | 7505d61 | 2001-07-31 13:06:17 +0000 | [diff] [blame] | 107 | .PHONY: default |
Rusty Russell | 5245182 | 2000-08-27 07:47:46 +0000 | [diff] [blame] | 108 | default: print-extensions all |
| 109 | |
Harald Welte | 7505d61 | 2001-07-31 13:06:17 +0000 | [diff] [blame] | 110 | .PHONY: print-extensions |
Rusty Russell | 5245182 | 2000-08-27 07:47:46 +0000 | [diff] [blame] | 111 | print-extensions: |
Rusty Russell | c8d7d89 | 2000-09-19 07:01:00 +0000 | [diff] [blame] | 112 | @[ -n "$(OPTIONALS)" ] && echo Extensions found: $(OPTIONALS) |
Marc Boucher | e6869a8 | 2000-03-20 06:03:29 +0000 | [diff] [blame] | 113 | |
| 114 | iptables.o: iptables.c |
| 115 | $(CC) $(CFLAGS) -DIPT_LIB_DIR=\"$(IPT_LIBDIR)\" -c -o $@ $< |
| 116 | |
Harald Welte | 3efb6ea | 2001-08-06 18:50:21 +0000 | [diff] [blame] | 117 | iptables: iptables-standalone.c iptables.o $(STATIC_LIBS) libiptc/libiptc.a |
| 118 | $(CC) $(CFLAGS) -DIPT_LIB_DIR=\"$(IPT_LIBDIR)\" $(LDFLAGS) -o $@ $^ $(LDLIBS) |
Marc Boucher | e6869a8 | 2000-03-20 06:03:29 +0000 | [diff] [blame] | 119 | |
| 120 | $(DESTDIR)$(BINDIR)/iptables: iptables |
| 121 | @[ -d $(DESTDIR)$(BINDIR) ] || mkdir -p $(DESTDIR)$(BINDIR) |
| 122 | cp $< $@ |
| 123 | |
Harald Welte | 3efb6ea | 2001-08-06 18:50:21 +0000 | [diff] [blame] | 124 | iptables-save: iptables-save.c iptables.o $(STATIC_LIBS) libiptc/libiptc.a |
| 125 | $(CC) $(CFLAGS) -DIPT_LIB_DIR=\"$(IPT_LIBDIR)\" $(LDFLAGS) -o $@ $^ $(LDLIBS) |
Marc Boucher | e6869a8 | 2000-03-20 06:03:29 +0000 | [diff] [blame] | 126 | |
| 127 | $(DESTDIR)$(BINDIR)/iptables-save: iptables-save |
| 128 | @[ -d $(DESTDIR)$(BINDIR) ] || mkdir -p $(DESTDIR)$(BINDIR) |
| 129 | cp $< $@ |
| 130 | |
Harald Welte | 3efb6ea | 2001-08-06 18:50:21 +0000 | [diff] [blame] | 131 | iptables-restore: iptables-restore.c iptables.o $(STATIC_LIBS) libiptc/libiptc.a |
| 132 | $(CC) $(CFLAGS) -DIPT_LIB_DIR=\"$(IPT_LIBDIR)\" $(LDFLAGS) -o $@ $^ $(LDLIBS) |
Marc Boucher | e6869a8 | 2000-03-20 06:03:29 +0000 | [diff] [blame] | 133 | |
| 134 | $(DESTDIR)$(BINDIR)/iptables-restore: iptables-restore |
| 135 | @[ -d $(DESTDIR)$(BINDIR) ] || mkdir -p $(DESTDIR)$(BINDIR) |
| 136 | cp $< $@ |
| 137 | |
Philip Blundell | 8c70090 | 2000-05-15 02:17:52 +0000 | [diff] [blame] | 138 | ip6tables.o: ip6tables.c |
Harald Welte | 0aefbd3 | 2001-05-11 21:41:47 +0000 | [diff] [blame] | 139 | $(CC) $(CFLAGS) -DIP6T_LIB_DIR=\"$(IPT_LIBDIR)\" -c -o $@ $< |
Philip Blundell | 8c70090 | 2000-05-15 02:17:52 +0000 | [diff] [blame] | 140 | |
Harald Welte | 3efb6ea | 2001-08-06 18:50:21 +0000 | [diff] [blame] | 141 | ip6tables: ip6tables-standalone.c ip6tables.o $(STATIC6_LIBS) libiptc/libiptc.a |
Harald Welte | 2a7116e | 2002-08-26 13:09:40 +0000 | [diff] [blame] | 142 | $(CC) $(CFLAGS) -DIP6T_LIB_DIR=\"$(IPT_LIBDIR)\" $(LDFLAGS) -o $@ $^ $(LDLIBS) |
Philip Blundell | 8c70090 | 2000-05-15 02:17:52 +0000 | [diff] [blame] | 143 | |
| 144 | $(DESTDIR)$(BINDIR)/ip6tables: ip6tables |
| 145 | @[ -d $(DESTDIR)$(BINDIR) ] || mkdir -p $(DESTDIR)$(BINDIR) |
| 146 | cp $< $@ |
| 147 | |
Harald Welte | 3efb6ea | 2001-08-06 18:50:21 +0000 | [diff] [blame] | 148 | ip6tables-save: ip6tables-save.c ip6tables.o $(STATIC6_LIBS) libiptc/libiptc.a |
Harald Welte | 2a7116e | 2002-08-26 13:09:40 +0000 | [diff] [blame] | 149 | $(CC) $(CFLAGS) -DIP6T_LIB_DIR=\"$(IPT_LIBDIR)\" $(LDFLAGS) -o $@ $^ $(LDLIBS) |
Philip Blundell | 8c70090 | 2000-05-15 02:17:52 +0000 | [diff] [blame] | 150 | |
| 151 | $(DESTDIR)$(BINDIR)/ip6tables-save: ip6tables-save |
| 152 | @[ -d $(DESTDIR)$(BINDIR) ] || mkdir -p $(DESTDIR)$(BINDIR) |
| 153 | cp $< $@ |
| 154 | |
Harald Welte | 3efb6ea | 2001-08-06 18:50:21 +0000 | [diff] [blame] | 155 | ip6tables-restore: ip6tables-restore.c ip6tables.o $(STATIC6_LIBS) libiptc/libiptc.a |
Harald Welte | 2a7116e | 2002-08-26 13:09:40 +0000 | [diff] [blame] | 156 | $(CC) $(CFLAGS) -DIP6T_LIB_DIR=\"$(IPT_LIBDIR)\" $(LDFLAGS) -o $@ $^ $(LDLIBS) |
Philip Blundell | 8c70090 | 2000-05-15 02:17:52 +0000 | [diff] [blame] | 157 | |
| 158 | $(DESTDIR)$(BINDIR)/ip6tables-restore: ip6tables-restore |
| 159 | @[ -d $(DESTDIR)$(BINDIR) ] || mkdir -p $(DESTDIR)$(BINDIR) |
| 160 | cp $< $@ |
| 161 | |
Rusty Russell | 01c4520 | 2001-01-07 06:50:31 +0000 | [diff] [blame] | 162 | $(DESTDIR)$(MANDIR)/man8/%.8: %.8 |
Marc Boucher | e6869a8 | 2000-03-20 06:03:29 +0000 | [diff] [blame] | 163 | @[ -d $(DESTDIR)$(MANDIR)/man8 ] || mkdir -p $(DESTDIR)$(MANDIR)/man8 |
| 164 | cp $< $@ |
| 165 | |
| 166 | EXTRA_DEPENDS+=iptables-standalone.d iptables.d |
| 167 | |
| 168 | iptables-standalone.d iptables.d: %.d: %.c |
| 169 | @-$(CC) -M -MG $(CFLAGS) $< | sed -e 's@^.*\.o:@$*.d $*.o:@' > $@ |
| 170 | |
Henrik Nordstrom | c279413 | 2004-01-22 15:04:24 +0000 | [diff] [blame] | 171 | iptables.8: iptables.8.in extensions/libipt_matches.man extensions/libipt_targets.man |
| 172 | sed -e '/@MATCH@/ r extensions/libipt_matches.man' -e '/@TARGET@/ r extensions/libipt_targets.man' iptables.8.in >iptables.8 |
| 173 | |
| 174 | ip6tables.8: ip6tables.8.in extensions/libip6t_matches.man extensions/libip6t_targets.man |
| 175 | sed -e '/@MATCH@/ r extensions/libip6t_matches.man' -e '/@TARGET@/ r extensions/libiptt_targets.man' ip6tables.8.in >ip6tables.8 |
James Morris | c82e9ac | 2000-11-24 14:34:02 +0000 | [diff] [blame] | 176 | |
| 177 | # Development Targets |
Harald Welte | 7505d61 | 2001-07-31 13:06:17 +0000 | [diff] [blame] | 178 | .PHONY: install-devel-man3 |
James Morris | c82e9ac | 2000-11-24 14:34:02 +0000 | [diff] [blame] | 179 | install-devel-man3: $(DEVEL_MAN3) |
| 180 | @[ -d $(DESTDIR)$(MANDIR)/man3 ] || mkdir -p $(DESTDIR)$(MANDIR)/man3 |
| 181 | @cp -v $(DEVEL_MAN3) $(DESTDIR)$(MANDIR)/man3 |
| 182 | |
Harald Welte | 7505d61 | 2001-07-31 13:06:17 +0000 | [diff] [blame] | 183 | .PHONY: install-devel-headers |
James Morris | c82e9ac | 2000-11-24 14:34:02 +0000 | [diff] [blame] | 184 | install-devel-headers: $(DEVEL_HEADERS) |
| 185 | @[ -d $(DESTDIR)$(INCDIR) ] || mkdir -p $(DESTDIR)$(INCDIR) |
| 186 | @cp -v $(DEVEL_HEADERS) $(DESTDIR)$(INCDIR) |
| 187 | |
Harald Welte | 7505d61 | 2001-07-31 13:06:17 +0000 | [diff] [blame] | 188 | .PHONY: install-devel-libs |
James Morris | c82e9ac | 2000-11-24 14:34:02 +0000 | [diff] [blame] | 189 | install-devel-libs: $(DEVEL_LIBS) |
| 190 | @[ -d $(DESTDIR)$(LIBDIR) ] || mkdir -p $(DESTDIR)$(LIBDIR) |
| 191 | @cp -v $(DEVEL_LIBS) $(DESTDIR)$(LIBDIR) |
| 192 | |
Harald Welte | 7505d61 | 2001-07-31 13:06:17 +0000 | [diff] [blame] | 193 | .PHONY: install-devel |
James Morris | c82e9ac | 2000-11-24 14:34:02 +0000 | [diff] [blame] | 194 | install-devel: all install-devel-man3 install-devel-headers install-devel-libs |
| 195 | |
Harald Welte | 7505d61 | 2001-07-31 13:06:17 +0000 | [diff] [blame] | 196 | .PHONY: distclean |
Rusty Russell | 905795c | 2000-04-19 11:22:03 +0000 | [diff] [blame] | 197 | distclean: clean |
Rusty Russell | a470f33 | 2000-11-07 04:08:34 +0000 | [diff] [blame] | 198 | @rm -f TAGS `find . -name '*~' -o -name '.*~'` `find . -name '*.rej'` `find . -name '*.d'` .makefirst |
Rusty Russell | 175f641 | 2000-03-24 09:32:20 +0000 | [diff] [blame] | 199 | |
| 200 | # Rusty's distro magic. |
Harald Welte | 7505d61 | 2001-07-31 13:06:17 +0000 | [diff] [blame] | 201 | .PHONY: distrib |
Harald Welte | 80fe35d | 2002-05-29 13:08:15 +0000 | [diff] [blame] | 202 | distrib: check distclean delrelease $(RELEASE_DIR)/iptables-$(IPTABLES_VERSION).tar.bz2 diff md5sums # nowhitespace |
Rusty Russell | 175f641 | 2000-03-24 09:32:20 +0000 | [diff] [blame] | 203 | |
| 204 | # Makefile must not define: |
Harald Welte | 380ba5f | 2002-02-13 16:19:55 +0000 | [diff] [blame] | 205 | # -g -pg -DIPTC_DEBUG |
Harald Welte | 7505d61 | 2001-07-31 13:06:17 +0000 | [diff] [blame] | 206 | .PHONY: check |
Rusty Russell | 175f641 | 2000-03-24 09:32:20 +0000 | [diff] [blame] | 207 | check: |
Harald Welte | 380ba5f | 2002-02-13 16:19:55 +0000 | [diff] [blame] | 208 | @if echo $(CFLAGS) | egrep -e '-g|-pg|IPTC_DEBUG' >/dev/null; then echo Remove debugging flags; exit 1; else exit 0; fi |
Rusty Russell | 175f641 | 2000-03-24 09:32:20 +0000 | [diff] [blame] | 209 | |
Harald Welte | 7505d61 | 2001-07-31 13:06:17 +0000 | [diff] [blame] | 210 | .PHONY: nowhitespace |
Rusty Russell | 175f641 | 2000-03-24 09:32:20 +0000 | [diff] [blame] | 211 | nowhitespace: |
Rusty Russell | 2e5f953 | 2001-01-07 09:37:02 +0000 | [diff] [blame] | 212 | @if grep -n '[ ]$$' `find . -name 'Makefile' -o -name '*.[ch]'`; then exit 1; else exit 0; fi |
Rusty Russell | 175f641 | 2000-03-24 09:32:20 +0000 | [diff] [blame] | 213 | |
Harald Welte | 7505d61 | 2001-07-31 13:06:17 +0000 | [diff] [blame] | 214 | .PHONY: delrelease |
Rusty Russell | 175f641 | 2000-03-24 09:32:20 +0000 | [diff] [blame] | 215 | delrelease: |
Harald Welte | 80fe35d | 2002-05-29 13:08:15 +0000 | [diff] [blame] | 216 | rm -f $(RELEASE_DIR)/iptables-$(IPTABLES_VERSION).tar.bz2 |
Rusty Russell | 175f641 | 2000-03-24 09:32:20 +0000 | [diff] [blame] | 217 | |
Harald Welte | 80fe35d | 2002-05-29 13:08:15 +0000 | [diff] [blame] | 218 | $(RELEASE_DIR)/iptables-$(IPTABLES_VERSION).tar.bz2: |
Harald Welte | ea4ab1c | 2004-06-14 22:07:06 +0000 | [diff] [blame^] | 219 | cd .. && ln -sf iptables iptables-$(IPTABLES_VERSION) && tar cvf - --exclude CVS iptables-$(IPTABLES_VERSION)/. | bzip2 -9 > $@ && rm iptables-$(IPTABLES_VERSION) |
Rusty Russell | 175f641 | 2000-03-24 09:32:20 +0000 | [diff] [blame] | 220 | |
Harald Welte | 7505d61 | 2001-07-31 13:06:17 +0000 | [diff] [blame] | 221 | .PHONY: diff |
Harald Welte | 80fe35d | 2002-05-29 13:08:15 +0000 | [diff] [blame] | 222 | diff: $(RELEASE_DIR)/iptables-$(IPTABLES_VERSION).tar.bz2 |
Rusty Russell | 175f641 | 2000-03-24 09:32:20 +0000 | [diff] [blame] | 223 | @mkdir /tmp/diffdir |
Harald Welte | 80fe35d | 2002-05-29 13:08:15 +0000 | [diff] [blame] | 224 | @cd /tmp/diffdir && tar -x --bzip2 -f $(RELEASE_DIR)/iptables-$(IPTABLES_VERSION).tar.bz2 |
| 225 | @set -e; cd /tmp/diffdir; tar -x --bzip2 -f $(RELEASE_DIR)/iptables-$(OLD_IPTABLES_VERSION).tar.bz2; echo Creating patch-iptables-$(OLD_IPTABLES_VERSION)-$(IPTABLES_VERSION).bz2; diff -urN iptables-$(OLD_IPTABLES_VERSION) iptables-$(IPTABLES_VERSION) | bzip2 -9 > $(RELEASE_DIR)/patch-iptables-$(OLD_IPTABLES_VERSION)-$(IPTABLES_VERSION).bz2 |
Rusty Russell | 175f641 | 2000-03-24 09:32:20 +0000 | [diff] [blame] | 226 | @rm -rf /tmp/diffdir |
| 227 | |
Harald Welte | 7505d61 | 2001-07-31 13:06:17 +0000 | [diff] [blame] | 228 | .PHONY: md5sums |
Rusty Russell | 175f641 | 2000-03-24 09:32:20 +0000 | [diff] [blame] | 229 | md5sums: |
Harald Welte | 80fe35d | 2002-05-29 13:08:15 +0000 | [diff] [blame] | 230 | cd $(RELEASE_DIR)/ && md5sum patch-iptables-*-$(IPTABLES_VERSION).bz2 iptables-$(IPTABLES_VERSION).tar.bz2 |
Rusty Russell | 175f641 | 2000-03-24 09:32:20 +0000 | [diff] [blame] | 231 | |
Marc Boucher | e6869a8 | 2000-03-20 06:03:29 +0000 | [diff] [blame] | 232 | # $(wildcard) fails wierdly with make v.3.78.1. |
| 233 | include $(shell echo */Makefile) |
| 234 | include Rules.make |