-SBINDIR = $(DESTDIR)/usr/local/sbin
+SBINDIR = $(DESTDIR)/usr/sbin
ETCDIR = $(DESTDIR)/etc/rrqnet
-MAN1DIR = $(DESTDIR)/usr/local/share/man/man1
-MAN8DIR = $(DESTDIR)/usr/local/share/man/man8
+MAN1DIR = $(DESTDIR)/usr/share/man/man1
+MAN8DIR = $(DESTDIR)/usr/share/man/man8
+LINTIAN = $(DESTDIR)/usr/share/lintian/overrides
-SBINFILES = rrqnet rrqnet-cron.sh
-ETCFILES = set-source-route.sh
+SBINCFILES = rrqnet
+SBINFILES = rrqnet-cron $(SBINCFILES)
+ETCFILES = set-source-route.sh ifupdown.sh
MAN1FILES =
-MAN8FILES = rrqnet.8 rrqnet-cron.sh.8
+MAN8FILES = rrqnet.8 rrqnet-cron.8 rrqnet-ifupdown.sh.8
HTMLDOC = $(MAN8FILES:%=%.html)
+.PHONY: ifupdown.sh
+
all: $(SBINFILES) $(ETCFILES) $(MAN1FILES) $(MAN8FILES) $(HTMLDOC)
+squeezetest: squeeze.c squeezetest.c
+
$(HTMLDOC): %.html: %.adoc
asciidoc -bhtml $^
COMPILEOPTS = -g -W -Wall
#COMPILEOPTS = -pg -no-pie -g -DGPROF
-$(filter-out %.sh,$(SBINFILES)): %: %.c
- $(CC) $(COMPILEOPTS) -static -o $@ $^ $(LDFLAGS)
+STATIC = -static
+$(filter-out %.sh,$(SBINCFILES)): %: %.c
+ $(CC) $(COMPILEOPTS) $(STATIC) -o $@ $^ $(LDFLAGS)
.PHONY: clean
clean:
- rm -f $(filter-out %.sh,$(SBINFILES))
+ rm -f $(filter-out %.sh,$(SBINCFILES))
# Installation targets
INSTALLTARGETS += $(addprefix $(ETCDIR)/,$(ETCFILES))
INSTALLTARGETS += $(addprefix $(MAN1DIR)/,$(MAN1FILES))
INSTALLTARGETS += $(addprefix $(MAN8DIR)/,$(MAN8FILES))
+INSTALLTARGETS += $(LINTIAN)/rrqnet
#INSTALL = install -b -S orig
INSTALL = install
+$(LINTIAN)/rrqnet: debian/lintian-overrides
+ mkdir -p ${@:/rrqnet=}
+ cp $^ $@
+
$(addprefix $(ETCDIR)/,conf.d keys):
mkdir -p $@
-$(ETCCFG)/cron.sh: rrqnet-cron.sh
+$(ETCDIR)/ifupdown.sh: rrqnet-ifupdown.sh
$(INSTALL) -D -T $< $@
$(SBINDIR)/% $(ETCDIR)/% $(MAN1DIR)/% $(MAN8DIR)/%: %