+SBINDIR = $(DESTDIR)/usr/sbin
+ETCDIR = $(DESTDIR)/etc/rrqnet
+MAN1DIR = $(DESTDIR)/usr/share/man/man1
+MAN8DIR = $(DESTDIR)/usr/share/man/man8
+VARLIBDIR = $(DESTDIR)/var/lib/overlay-boot
+
+SBINCFILES =
+#SBINFILES = overlay-boot overlay-go overlay-stop
+ETCFILES =
+MAN1FILES =
+MAN8FILES =
+HTMLDOC = $(MAN8FILES:%=%.html)
+VARLIBFILES = overlay-boot overlay-go overlay-stop functions reaper
+
+all: reaper/reaper
+
+reaper/reaper:
+ $(MAKE) -C reaper
+
+$(VARLIBDIR)/:
+ mkdir -p $@
+
+$(addprefix $(VARLIBDIR)/,$(VARLIBFILES)): $(VARLIBDIR)/%: % | $(VARLIBDIR)/
+ cp -p $< $@
+
+#$(SBINDIR)/:
+# mkdir -p $@
+#
+#$(addprefix $(SBINDIR)/,$(SBINFILES)): $(SBINDIR)/%: $(VARLIBDIR)/% | $(SBINDIR)/
+# ln -sTf $< $@
+
+$(VARLIBDIR)/reaper: reaper/reaper
+ cp $< $@
+
+INSTALLTARGETS = $(addprefix $(SBINDIR)/,$(SBINFILES))
+INSTALLTARGETS += $(addprefix $(ETCDIR)/,$(ETCFILES))
+INSTALLTARGETS += $(addprefix $(MAN1DIR)/,$(MAN1FILES))
+INSTALLTARGETS += $(addprefix $(MAN8DIR)/,$(MAN8FILES))
+INSTALLTARGETS += $(addprefix $(VARLIBDIR)/,$(VARLIBFILES))
+
+install: $(INSTALLTARGETS)
+
+BUILDPACKAGE = -us -uc --build=full -Iolle
+deb:
+ PREFIX= INCLUDE_PREFIX=/usr dpkg-buildpackage $(BUILDPACKAGE)