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 | 3a5026f | 2001-09-02 16:07:33 +0000 | [diff] [blame] | 4 | ###################################################################### |
| 5 | # YOU SHOULD NOT NEED TO TOUCH ANYTHING BELOW THIS LINE |
| 6 | ###################################################################### |
| 7 | |
| 8 | # Standard part of Makefile for topdir. |
| 9 | TOPLEVEL_INCLUDED=YES |
| 10 | |
Marc Boucher | e6869a8 | 2000-03-20 06:03:29 +0000 | [diff] [blame] | 11 | ifndef KERNEL_DIR |
| 12 | KERNEL_DIR=/usr/src/linux |
| 13 | endif |
Harald Welte | 6a31b71 | 2002-08-26 12:24:51 +0000 | [diff] [blame] | 14 | IPTABLES_VERSION:=1.2.7a |
| 15 | OLD_IPTABLES_VERSION:=1.2.6a |
Marc Boucher | e6869a8 | 2000-03-20 06:03:29 +0000 | [diff] [blame] | 16 | |
Harald Welte | ba6d012 | 2002-02-17 19:49:26 +0000 | [diff] [blame] | 17 | PREFIX:=/usr/local |
| 18 | LIBDIR:=$(PREFIX)/lib |
| 19 | BINDIR:=$(PREFIX)/sbin |
| 20 | MANDIR:=$(PREFIX)/man |
| 21 | INCDIR:=$(PREFIX)/include |
Marc Boucher | e6869a8 | 2000-03-20 06:03:29 +0000 | [diff] [blame] | 22 | |
Harald Welte | 3a5026f | 2001-09-02 16:07:33 +0000 | [diff] [blame] | 23 | # directory for new iptables releases |
| 24 | RELEASE_DIR:=/tmp |
| 25 | |
Rusty Russell | 209820b | 2001-01-08 08:14:33 +0000 | [diff] [blame] | 26 | # Need libc6 for this. FIXME: Should covert to autoconf. |
Rusty Russell | 4d2afbf | 2001-05-01 02:06:08 +0000 | [diff] [blame] | 27 | ifeq ($(shell [ -f /usr/include/netinet/ip6.h ] && echo YES), YES) |
Rusty Russell | 8e07bd7 | 2000-12-19 03:11:00 +0000 | [diff] [blame] | 28 | DO_IPV6=1 |
| 29 | endif |
| 30 | |
Harald Welte | 380ba5f | 2002-02-13 16:19:55 +0000 | [diff] [blame] | 31 | COPT_FLAGS:=-O2 |
Harald Welte | 80fe35d | 2002-05-29 13:08:15 +0000 | [diff] [blame] | 32 | 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] | 33 | |
Harald Welte | 3efb6ea | 2001-08-06 18:50:21 +0000 | [diff] [blame] | 34 | ifdef NO_SHARED_LIBS |
| 35 | CFLAGS += -DNO_SHARED_LIBS=1 |
| 36 | endif |
| 37 | |
| 38 | ifndef NO_SHARED_LIBS |
Rusty Russell | 5622f21 | 2000-05-02 16:42:09 +0000 | [diff] [blame] | 39 | DEPFILES = $(SHARED_LIBS:%.so=%.d) |
Marc Boucher | e6869a8 | 2000-03-20 06:03:29 +0000 | [diff] [blame] | 40 | SH_CFLAGS:=$(CFLAGS) -fPIC |
Harald Welte | 3efb6ea | 2001-08-06 18:50:21 +0000 | [diff] [blame] | 41 | STATIC_LIBS = |
| 42 | STATIC6_LIBS = |
| 43 | LDFLAGS = -rdynamic |
| 44 | LDLIBS = -ldl |
| 45 | else |
| 46 | DEPFILES = $(EXT_OBJS:%.o=%.d) |
| 47 | STATIC_LIBS = extensions/libext.a |
| 48 | STATIC6_LIBS = extensions/libext6.a |
Harald Welte | 2a7116e | 2002-08-26 13:09:40 +0000 | [diff] [blame] | 49 | LDFLAGS = -static |
Harald Welte | 3efb6ea | 2001-08-06 18:50:21 +0000 | [diff] [blame] | 50 | LDLIBS = |
| 51 | endif |
Marc Boucher | e6869a8 | 2000-03-20 06:03:29 +0000 | [diff] [blame] | 52 | |
Rusty Russell | 2e5f953 | 2001-01-07 09:37:02 +0000 | [diff] [blame] | 53 | EXTRAS+=iptables iptables.o |
Rusty Russell | 01c4520 | 2001-01-07 06:50:31 +0000 | [diff] [blame] | 54 | EXTRA_INSTALLS+=$(DESTDIR)$(BINDIR)/iptables $(DESTDIR)$(MANDIR)/man8/iptables.8 |
| 55 | |
Harald Welte | eba774d | 2001-10-16 08:22:40 +0000 | [diff] [blame] | 56 | # No longer experimental. |
| 57 | EXTRAS+=iptables-save iptables-restore |
| 58 | 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] | 59 | |
| 60 | ifdef DO_IPV6 |
| 61 | EXTRAS+=ip6tables ip6tables.o |
András Kis-Szabó | 0612943 | 2001-10-14 13:27:03 +0000 | [diff] [blame] | 62 | EXTRA_INSTALLS+=$(DESTDIR)$(BINDIR)/ip6tables $(DESTDIR)$(MANDIR)/man8/ip6tables.8 |
Harald Welte | 8a6831a | 2001-03-15 15:33:56 +0000 | [diff] [blame] | 63 | EXTRAS_EXP+=ip6tables-save ip6tables-restore |
Harald Welte | 46d4d0a | 2001-03-16 15:48:56 +0000 | [diff] [blame] | 64 | 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] | 65 | endif |
Marc Boucher | e6869a8 | 2000-03-20 06:03:29 +0000 | [diff] [blame] | 66 | |
Rusty Russell | 09b9a41 | 2000-04-27 10:16:47 +0000 | [diff] [blame] | 67 | # Sparc64 hack |
| 68 | ifeq ($(shell uname -m),sparc64) |
| 69 | # The kernel is 64-bit, even though userspace is 32. |
Rusty Russell | c8d7d89 | 2000-09-19 07:01:00 +0000 | [diff] [blame] | 70 | CFLAGS+=-DIPT_MIN_ALIGN=8 -DKERNEL_64_USERSPACE_32 |
Rusty Russell | 09b9a41 | 2000-04-27 10:16:47 +0000 | [diff] [blame] | 71 | endif |
| 72 | |
Rusty Russell | da70715 | 2001-04-21 04:25:09 +0000 | [diff] [blame] | 73 | # HPPA hack |
| 74 | ifeq ($(shell uname -m),parisc64) |
| 75 | # The kernel is 64-bit, even though userspace is 32. |
| 76 | CFLAGS+=-DIPT_MIN_ALIGN=8 -DKERNEL_64_USERSPACE_32 |
| 77 | endif |
| 78 | |
Marc Boucher | e6869a8 | 2000-03-20 06:03:29 +0000 | [diff] [blame] | 79 | ifndef IPT_LIBDIR |
| 80 | IPT_LIBDIR:=$(LIBDIR)/iptables |
| 81 | endif |
| 82 | |
Harald Welte | 7505d61 | 2001-07-31 13:06:17 +0000 | [diff] [blame] | 83 | .PHONY: default |
Rusty Russell | 5245182 | 2000-08-27 07:47:46 +0000 | [diff] [blame] | 84 | default: print-extensions all |
| 85 | |
Harald Welte | 7505d61 | 2001-07-31 13:06:17 +0000 | [diff] [blame] | 86 | .PHONY: print-extensions |
Rusty Russell | 5245182 | 2000-08-27 07:47:46 +0000 | [diff] [blame] | 87 | print-extensions: |
Rusty Russell | c8d7d89 | 2000-09-19 07:01:00 +0000 | [diff] [blame] | 88 | @[ -n "$(OPTIONALS)" ] && echo Extensions found: $(OPTIONALS) |
Marc Boucher | e6869a8 | 2000-03-20 06:03:29 +0000 | [diff] [blame] | 89 | |
| 90 | iptables.o: iptables.c |
| 91 | $(CC) $(CFLAGS) -DIPT_LIB_DIR=\"$(IPT_LIBDIR)\" -c -o $@ $< |
| 92 | |
Harald Welte | 3efb6ea | 2001-08-06 18:50:21 +0000 | [diff] [blame] | 93 | iptables: iptables-standalone.c iptables.o $(STATIC_LIBS) libiptc/libiptc.a |
| 94 | $(CC) $(CFLAGS) -DIPT_LIB_DIR=\"$(IPT_LIBDIR)\" $(LDFLAGS) -o $@ $^ $(LDLIBS) |
Marc Boucher | e6869a8 | 2000-03-20 06:03:29 +0000 | [diff] [blame] | 95 | |
| 96 | $(DESTDIR)$(BINDIR)/iptables: iptables |
| 97 | @[ -d $(DESTDIR)$(BINDIR) ] || mkdir -p $(DESTDIR)$(BINDIR) |
| 98 | cp $< $@ |
| 99 | |
Harald Welte | 3efb6ea | 2001-08-06 18:50:21 +0000 | [diff] [blame] | 100 | iptables-save: iptables-save.c iptables.o $(STATIC_LIBS) libiptc/libiptc.a |
| 101 | $(CC) $(CFLAGS) -DIPT_LIB_DIR=\"$(IPT_LIBDIR)\" $(LDFLAGS) -o $@ $^ $(LDLIBS) |
Marc Boucher | e6869a8 | 2000-03-20 06:03:29 +0000 | [diff] [blame] | 102 | |
| 103 | $(DESTDIR)$(BINDIR)/iptables-save: iptables-save |
| 104 | @[ -d $(DESTDIR)$(BINDIR) ] || mkdir -p $(DESTDIR)$(BINDIR) |
| 105 | cp $< $@ |
| 106 | |
Harald Welte | 3efb6ea | 2001-08-06 18:50:21 +0000 | [diff] [blame] | 107 | iptables-restore: iptables-restore.c iptables.o $(STATIC_LIBS) libiptc/libiptc.a |
| 108 | $(CC) $(CFLAGS) -DIPT_LIB_DIR=\"$(IPT_LIBDIR)\" $(LDFLAGS) -o $@ $^ $(LDLIBS) |
Marc Boucher | e6869a8 | 2000-03-20 06:03:29 +0000 | [diff] [blame] | 109 | |
| 110 | $(DESTDIR)$(BINDIR)/iptables-restore: iptables-restore |
| 111 | @[ -d $(DESTDIR)$(BINDIR) ] || mkdir -p $(DESTDIR)$(BINDIR) |
| 112 | cp $< $@ |
| 113 | |
Philip Blundell | 8c70090 | 2000-05-15 02:17:52 +0000 | [diff] [blame] | 114 | ip6tables.o: ip6tables.c |
Harald Welte | 0aefbd3 | 2001-05-11 21:41:47 +0000 | [diff] [blame] | 115 | $(CC) $(CFLAGS) -DIP6T_LIB_DIR=\"$(IPT_LIBDIR)\" -c -o $@ $< |
Philip Blundell | 8c70090 | 2000-05-15 02:17:52 +0000 | [diff] [blame] | 116 | |
Harald Welte | 3efb6ea | 2001-08-06 18:50:21 +0000 | [diff] [blame] | 117 | ip6tables: ip6tables-standalone.c ip6tables.o $(STATIC6_LIBS) libiptc/libiptc.a |
Harald Welte | 2a7116e | 2002-08-26 13:09:40 +0000 | [diff] [blame] | 118 | $(CC) $(CFLAGS) -DIP6T_LIB_DIR=\"$(IPT_LIBDIR)\" $(LDFLAGS) -o $@ $^ $(LDLIBS) |
Philip Blundell | 8c70090 | 2000-05-15 02:17:52 +0000 | [diff] [blame] | 119 | |
| 120 | $(DESTDIR)$(BINDIR)/ip6tables: ip6tables |
| 121 | @[ -d $(DESTDIR)$(BINDIR) ] || mkdir -p $(DESTDIR)$(BINDIR) |
| 122 | cp $< $@ |
| 123 | |
Harald Welte | 3efb6ea | 2001-08-06 18:50:21 +0000 | [diff] [blame] | 124 | ip6tables-save: ip6tables-save.c ip6tables.o $(STATIC6_LIBS) libiptc/libiptc.a |
Harald Welte | 2a7116e | 2002-08-26 13:09:40 +0000 | [diff] [blame] | 125 | $(CC) $(CFLAGS) -DIP6T_LIB_DIR=\"$(IPT_LIBDIR)\" $(LDFLAGS) -o $@ $^ $(LDLIBS) |
Philip Blundell | 8c70090 | 2000-05-15 02:17:52 +0000 | [diff] [blame] | 126 | |
| 127 | $(DESTDIR)$(BINDIR)/ip6tables-save: ip6tables-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 | ip6tables-restore: ip6tables-restore.c ip6tables.o $(STATIC6_LIBS) libiptc/libiptc.a |
Harald Welte | 2a7116e | 2002-08-26 13:09:40 +0000 | [diff] [blame] | 132 | $(CC) $(CFLAGS) -DIP6T_LIB_DIR=\"$(IPT_LIBDIR)\" $(LDFLAGS) -o $@ $^ $(LDLIBS) |
Philip Blundell | 8c70090 | 2000-05-15 02:17:52 +0000 | [diff] [blame] | 133 | |
| 134 | $(DESTDIR)$(BINDIR)/ip6tables-restore: ip6tables-restore |
| 135 | @[ -d $(DESTDIR)$(BINDIR) ] || mkdir -p $(DESTDIR)$(BINDIR) |
| 136 | cp $< $@ |
| 137 | |
Rusty Russell | 01c4520 | 2001-01-07 06:50:31 +0000 | [diff] [blame] | 138 | $(DESTDIR)$(MANDIR)/man8/%.8: %.8 |
Marc Boucher | e6869a8 | 2000-03-20 06:03:29 +0000 | [diff] [blame] | 139 | @[ -d $(DESTDIR)$(MANDIR)/man8 ] || mkdir -p $(DESTDIR)$(MANDIR)/man8 |
| 140 | cp $< $@ |
| 141 | |
| 142 | EXTRA_DEPENDS+=iptables-standalone.d iptables.d |
| 143 | |
| 144 | iptables-standalone.d iptables.d: %.d: %.c |
| 145 | @-$(CC) -M -MG $(CFLAGS) $< | sed -e 's@^.*\.o:@$*.d $*.o:@' > $@ |
| 146 | |
James Morris | c82e9ac | 2000-11-24 14:34:02 +0000 | [diff] [blame] | 147 | |
| 148 | # Development Targets |
Harald Welte | 7505d61 | 2001-07-31 13:06:17 +0000 | [diff] [blame] | 149 | .PHONY: install-devel-man3 |
James Morris | c82e9ac | 2000-11-24 14:34:02 +0000 | [diff] [blame] | 150 | install-devel-man3: $(DEVEL_MAN3) |
| 151 | @[ -d $(DESTDIR)$(MANDIR)/man3 ] || mkdir -p $(DESTDIR)$(MANDIR)/man3 |
| 152 | @cp -v $(DEVEL_MAN3) $(DESTDIR)$(MANDIR)/man3 |
| 153 | |
Harald Welte | 7505d61 | 2001-07-31 13:06:17 +0000 | [diff] [blame] | 154 | .PHONY: install-devel-headers |
James Morris | c82e9ac | 2000-11-24 14:34:02 +0000 | [diff] [blame] | 155 | install-devel-headers: $(DEVEL_HEADERS) |
| 156 | @[ -d $(DESTDIR)$(INCDIR) ] || mkdir -p $(DESTDIR)$(INCDIR) |
| 157 | @cp -v $(DEVEL_HEADERS) $(DESTDIR)$(INCDIR) |
| 158 | |
Harald Welte | 7505d61 | 2001-07-31 13:06:17 +0000 | [diff] [blame] | 159 | .PHONY: install-devel-libs |
James Morris | c82e9ac | 2000-11-24 14:34:02 +0000 | [diff] [blame] | 160 | install-devel-libs: $(DEVEL_LIBS) |
| 161 | @[ -d $(DESTDIR)$(LIBDIR) ] || mkdir -p $(DESTDIR)$(LIBDIR) |
| 162 | @cp -v $(DEVEL_LIBS) $(DESTDIR)$(LIBDIR) |
| 163 | |
Harald Welte | 7505d61 | 2001-07-31 13:06:17 +0000 | [diff] [blame] | 164 | .PHONY: install-devel |
James Morris | c82e9ac | 2000-11-24 14:34:02 +0000 | [diff] [blame] | 165 | install-devel: all install-devel-man3 install-devel-headers install-devel-libs |
| 166 | |
Harald Welte | 7505d61 | 2001-07-31 13:06:17 +0000 | [diff] [blame] | 167 | .PHONY: distclean |
Rusty Russell | 905795c | 2000-04-19 11:22:03 +0000 | [diff] [blame] | 168 | distclean: clean |
Rusty Russell | a470f33 | 2000-11-07 04:08:34 +0000 | [diff] [blame] | 169 | @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] | 170 | |
| 171 | # Rusty's distro magic. |
Harald Welte | 7505d61 | 2001-07-31 13:06:17 +0000 | [diff] [blame] | 172 | .PHONY: distrib |
Harald Welte | 80fe35d | 2002-05-29 13:08:15 +0000 | [diff] [blame] | 173 | 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] | 174 | |
| 175 | # Makefile must not define: |
Harald Welte | 380ba5f | 2002-02-13 16:19:55 +0000 | [diff] [blame] | 176 | # -g -pg -DIPTC_DEBUG |
Harald Welte | 7505d61 | 2001-07-31 13:06:17 +0000 | [diff] [blame] | 177 | .PHONY: check |
Rusty Russell | 175f641 | 2000-03-24 09:32:20 +0000 | [diff] [blame] | 178 | check: |
Harald Welte | 380ba5f | 2002-02-13 16:19:55 +0000 | [diff] [blame] | 179 | @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] | 180 | |
Harald Welte | 7505d61 | 2001-07-31 13:06:17 +0000 | [diff] [blame] | 181 | .PHONY: nowhitespace |
Rusty Russell | 175f641 | 2000-03-24 09:32:20 +0000 | [diff] [blame] | 182 | nowhitespace: |
Rusty Russell | 2e5f953 | 2001-01-07 09:37:02 +0000 | [diff] [blame] | 183 | @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] | 184 | |
Harald Welte | 7505d61 | 2001-07-31 13:06:17 +0000 | [diff] [blame] | 185 | .PHONY: delrelease |
Rusty Russell | 175f641 | 2000-03-24 09:32:20 +0000 | [diff] [blame] | 186 | delrelease: |
Harald Welte | 80fe35d | 2002-05-29 13:08:15 +0000 | [diff] [blame] | 187 | rm -f $(RELEASE_DIR)/iptables-$(IPTABLES_VERSION).tar.bz2 |
Rusty Russell | 175f641 | 2000-03-24 09:32:20 +0000 | [diff] [blame] | 188 | |
Harald Welte | 80fe35d | 2002-05-29 13:08:15 +0000 | [diff] [blame] | 189 | $(RELEASE_DIR)/iptables-$(IPTABLES_VERSION).tar.bz2: |
| 190 | cd .. && ln -sf userspace 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] | 191 | |
Harald Welte | 7505d61 | 2001-07-31 13:06:17 +0000 | [diff] [blame] | 192 | .PHONY: diff |
Harald Welte | 80fe35d | 2002-05-29 13:08:15 +0000 | [diff] [blame] | 193 | diff: $(RELEASE_DIR)/iptables-$(IPTABLES_VERSION).tar.bz2 |
Rusty Russell | 175f641 | 2000-03-24 09:32:20 +0000 | [diff] [blame] | 194 | @mkdir /tmp/diffdir |
Harald Welte | 80fe35d | 2002-05-29 13:08:15 +0000 | [diff] [blame] | 195 | @cd /tmp/diffdir && tar -x --bzip2 -f $(RELEASE_DIR)/iptables-$(IPTABLES_VERSION).tar.bz2 |
| 196 | @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] | 197 | @rm -rf /tmp/diffdir |
| 198 | |
Harald Welte | 7505d61 | 2001-07-31 13:06:17 +0000 | [diff] [blame] | 199 | .PHONY: md5sums |
Rusty Russell | 175f641 | 2000-03-24 09:32:20 +0000 | [diff] [blame] | 200 | md5sums: |
Harald Welte | 80fe35d | 2002-05-29 13:08:15 +0000 | [diff] [blame] | 201 | 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] | 202 | |
Marc Boucher | e6869a8 | 2000-03-20 06:03:29 +0000 | [diff] [blame] | 203 | # $(wildcard) fails wierdly with make v.3.78.1. |
| 204 | include $(shell echo */Makefile) |
| 205 | include Rules.make |