summaryrefslogtreecommitdiffstats
path: root/userspace/arptables/Makefile
diff options
context:
space:
mode:
authorBart De Schuymer <bdschuym@pandora.be>2003-06-09 20:47:32 +0000
committerBart De Schuymer <bdschuym@pandora.be>2003-06-09 20:47:32 +0000
commit787a2f9c56f4dfc225ae402b07c2c355ee4aedf5 (patch)
tree087bbfb52bcb116e115c17a6e4e3c290bc1d1c3c /userspace/arptables/Makefile
parent351b5fce411d37440df0f5857d111ea6c708056f (diff)
*** empty log message ***
Diffstat (limited to 'userspace/arptables/Makefile')
-rw-r--r--userspace/arptables/Makefile75
1 files changed, 75 insertions, 0 deletions
diff --git a/userspace/arptables/Makefile b/userspace/arptables/Makefile
new file mode 100644
index 0000000..b526832
--- /dev/null
+++ b/userspace/arptables/Makefile
@@ -0,0 +1,75 @@
+# Standard part of Makefile for topdir.
+TOPLEVEL_INCLUDED=YES
+
+ifndef KERNEL_DIR
+KERNEL_DIR=include/linux
+endif
+ARPTABLES_VERSION:=0.0.0
+OLD_ARPTABLES_VERSION:=0.0.-1
+
+PREFIX:=/usr/local
+LIBDIR:=$(PREFIX)/lib
+BINDIR:=$(PREFIX)/sbin
+MANDIR:=$(PREFIX)/man
+INCDIR:=$(PREFIX)/include
+BINFILE:=$(BINDIR)/arptables
+
+# directory for new arptables releases
+RELEASE_DIR:=/tmp
+
+COPT_FLAGS:=-O2
+CFLAGS:=$(COPT_FLAGS) -Wall -Wunused -I$(KERNEL_DIR)/include/ -Iinclude/ -DARPTABLES_VERSION=\"$(ARPTABLES_VERSION)\" #-g -DDEBUG #-pg # -DARPTC_DEBUG
+
+EXTRAS+=iptables iptables.o
+EXTRA_INSTALLS+=$(DESTDIR)$(BINDIR)/iptables $(DESTDIR)$(MANDIR)/man8/iptables.8
+
+ifndef ARPT_LIBDIR
+ARPT_LIBDIR:=$(LIBDIR)/arptables
+endif
+
+include extensions/Makefile
+
+all: arptables
+
+arptables.o: arptables.c
+ $(CC) $(CFLAGS) -DIPT_LIB_DIR=\"$(IPT_LIBDIR)\" -c -o $@ $<
+
+arptables-standalone.o: arptables-standalone.c
+ $(CC) $(CFLAGS) -DIPT_LIB_DIR=\"$(IPT_LIBDIR)\" -c -o $@ $<
+
+libarptc/libarptc.o: libarptc/libarptc.c
+ $(CC) $(CFLAGS) -DIPT_LIB_DIR=\"$(IPT_LIBDIR)\" -c -o $@ $<
+
+arptables: arptables-standalone.o arptables.o libarptc/libarptc.o $(EXT_OBJS)
+ $(CC) $(CFLAGS) -o $@ $^
+
+$(DESTDIR)$(BINDIR)/arptables: arptables
+ @[ -d $(DESTDIR)$(BINDIR) ] || mkdir -p $(DESTDIR)$(BINDIR)
+ cp $< $@
+
+.PHONY: exec
+exec: arptables
+ install -m 0755 -o root -g root $< $(BINFILE)
+
+.PHONY: install
+install: exec
+
+.PHONY: clean
+clean:
+ rm -f arptables
+ rm -f *.o *.c~
+ rm -f extensions/*.o extensions/*.c~
+ rm -f libarpt/*.o libarpt/*.c~
+
+DIR:=arptables-v$(ARPTABLES_VERSION)
+# This is used to make a new userspace release
+.PHONY: release
+release:
+ mkdir -p include/linux/netfilter_arp
+ install -m 0644 -o root -g root \
+ $(KERNEL_DIR)/include/linux/netfilter_arp.h include/linux/
+ install -m 0644 -o root -g root \
+ $(KERNEL_DIR)/include/linux/netfilter_arp/*.h \
+ include/linux/netfilter_arp/
+ make clean
+ cd ..;tar -c $(DIR) | gzip >$(DIR).tar.gz