3 all: $(SHARED_LIBS) $(EXTRAS)
5 experimental: $(EXTRAS_EXP)
7 # Have to handle extensions which no longer exist.
9 rm -f $(SHARED_LIBS) $(EXTRAS) $(EXTRAS_EXP) $(SHARED_LIBS:%.so=%_sh.o)
10 rm -f extensions/initext.c extensions/initext6.c
11 rm -f $(DEPFILES) $(EXTRA_DEPENDS) .makefirst
12 @find . -name '*.[ao]' -o -name '*.so' | xargs rm -f
14 install: all $(EXTRA_INSTALLS)
15 @if [ -f /usr/local/bin/iptables -a "$(BINDIR)" = "/usr/local/sbin" ];\
16 then echo 'Erasing iptables from old location (now /usr/local/sbin).';\
17 rm -f /usr/local/bin/iptables;\
20 install-experimental: $(EXTRA_INSTALLS_EXP)
24 find . -name '*.[ch]' | xargs etags -a
26 dep: $(DEPFILES) $(EXTRA_DEPENDS)
27 @echo Dependencies will be generated on next make.
28 rm -f $(DEPFILES) $(EXTRA_DEPENDS) .makefirst
30 $(SHARED_LIBS:%.so=%.d): %.d: %.c
31 @-$(CC) -M -MG $(CFLAGS) $< | \
32 sed -e 's@^.*\.o:@$*.d $*_sh.o:@' > $@
34 $(SHARED_LIBS): %.so : %_sh.o
35 $(LD) -shared $(EXT_LDFLAGS) -o $@ $<
38 $(CC) $(SH_CFLAGS) -o $@ -c $<
41 @echo Making dependencies: please wait...
44 # This is useful for when dependencies completely screwed
46 @echo Something wrong... deleting dependencies.
47 @-rm -f $(DEPFILES) $(EXTRA_DEPENDS) .makefirst
48 @[ -d $(KERNEL_DIR)/include/linux/netfilter_ipv4 ] || echo -e '\n\n Please try `make KERNEL_DIR=path-to-correct-kernel'\'.'\n\n'
51 -include $(DEPFILES) $(EXTRA_DEPENDS)