summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorBart De Schuymer <bdschuym@pandora.be>2007-08-15 13:06:32 +0000
committerBart De Schuymer <bdschuym@pandora.be>2007-08-15 13:06:32 +0000
commitc56b36fff5b06657510dfe9034543a61d748c460 (patch)
tree8af93757081765b7eddfd7c831116d8dec23ad15 /Makefile
parent251857cfa6da3a98e4ea863acd59117ca5b27d23 (diff)
fix BINDIR+cleanup (Peter Volkov)
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile30
1 files changed, 8 insertions, 22 deletions
diff --git a/Makefile b/Makefile
index 99f8de6..ed4bb39 100644
--- a/Makefile
+++ b/Makefile
@@ -14,13 +14,6 @@ BINDIR:=$(PREFIX)/sbin
MANDIR:=$(PREFIX)/man
DESTDIR:=
-# include DESTDIR param
-override LIBDIR:=$(DESTDIR)$(LIBDIR)
-override MANDIR:=$(DESTDIR)$(MANDIR)
-override BINDIR:=$(DESTDIR)$(BINDIR)
-
-
-BINFILE:=$(BINDIR)/arptables
# directory for new arptables releases
RELEASE_DIR:=/tmp
@@ -28,9 +21,6 @@ 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+=$(BINDIR)/iptables $(MANDIR)/man8/iptables.8
-
ifndef ARPT_LIBDIR
ARPT_LIBDIR:=$(LIBDIR)/arptables
endif
@@ -40,29 +30,25 @@ include extensions/Makefile
all: arptables
arptables.o: arptables.c
- $(CC) $(CFLAGS) -DIPT_LIB_DIR=\"$(IPT_LIBDIR)\" -c -o $@ $<
+ $(CC) $(CFLAGS) -c -o $@ $<
arptables-standalone.o: arptables-standalone.c
- $(CC) $(CFLAGS) -DIPT_LIB_DIR=\"$(IPT_LIBDIR)\" -c -o $@ $<
+ $(CC) $(CFLAGS) -c -o $@ $<
libarptc/libarptc.o: libarptc/libarptc.c libarptc/libarptc_incl.c
- $(CC) $(CFLAGS) -DIPT_LIB_DIR=\"$(IPT_LIBDIR)\" -c -o $@ $<
+ $(CC) $(CFLAGS) -c -o $@ $<
arptables: arptables-standalone.o arptables.o libarptc/libarptc.o $(EXT_OBJS)
- $(CC) $(CFLAGS) -o $@ $^
-
-$(BINDIR)/arptables: arptables
- mkdir -p $(BINDIR)
- cp $< $@
+ $(CC) $(CFLAGS) -o $@ $^
$(MANDIR)/man8/arptables.8: arptables.8
- mkdir -p $(@D)
- install -m 0644 -o root -g root $< $@
+ mkdir -p $(DESTDIR)$(@D)
+ install -m 0644 -o root -g root $< $(DESTDIR)$@
.PHONY: exec
exec: arptables
- mkdir -p $(BINDIR)
- install -m 0755 -o root -g root $< $(BINFILE)
+ mkdir -p $(DESTDIR)$(BINDIR)
+ install -m 0755 -o root -g root $< $(DESTDIR)$(BINDIR)/arptables
.PHONY: install
install: $(MANDIR)/man8/arptables.8 exec