1 ETCDIR = $(DESTDIR)/etc
2 INITDIR = $(DESTDIR)/etc/init.d
3 MAN8DIR = $(DESTDIR)/usr/share/man/man8
4 SBINDIR = $(DESTDIR)/usr/sbin
5 VARLIBDIR = $(DESTDIR)/var/lib/overlay-boot
7 MAN8FILES = overlay-boot.8 overlay-go.8 overlay-stop.8 overlay-diskfile.8
8 MAN8FILES += overlay-share.8
9 VARLIBFILES = overlay-boot overlay-go overlay-stop functions reaper
10 VARLIBFILES += overlay-init overlay-postmount overlay-premount
11 VARLIBFILES += overlay-diskfile
12 VARLIBFILES += overlay-share
14 ETCFILES = subhosts.conf
16 # The default is to build asm/reaper
20 # Specific rule: $(REAPER) is ensured by "recursive make"
22 $(MAKE) -C $$(dirname $(REAPER)) reaper
24 # Specific rule: the reaper program originates from $(REAPER)
28 # Specific rule: the sysvinit init file
29 $(INITDIR)/subhosts: subhosts.sh | $(INITDIR)/
32 # Specific rule: the sysvinit init configuration file
33 $(ETCDIR)/subhosts.conf: subhosts.conf | $(ETCDIR)/
36 # Generic rule: any dependee directory needs to be created
40 # Generic rule: a local .8 file depends on the same .8.adoc file, if any
41 $(MAN8FILES): %: %.adoc
42 asciidoctor -b manpage $^
44 # Generic rule: an installed MAN8FILE file depends on a local the
45 # same, and that the installation directory exists
46 $(addprefix $(MAN8DIR)/,$(MAN8FILES)): $(MAN8DIR)/%: % | $(MAN8DIR)/
49 # Generic rule: an installed VARLIBFILES file depends on a local the
50 # same, and that the installation directory exists
51 $(addprefix $(VARLIBDIR)/,$(VARLIBFILES)): $(VARLIBDIR)/%: % | $(VARLIBDIR)/
54 # Make target: to clean up this workspace
57 make -C $$(dirname $(REAPER)) clean
59 .INTERMEDIATE: reaper $(MAN8FILES)
61 # Make target: enumerates that which should be installed
62 INSTALLTARGETS += $(addprefix $(MAN8DIR)/,$(MAN8FILES))
63 INSTALLTARGETS += $(addprefix $(VARLIBDIR)/,$(VARLIBFILES))
64 INSTALLTARGETS += $(addprefix $(INITDIR)/,$(INITFILES))
65 INSTALLTARGETS += $(addprefix $(ETCDIR)/,$(ETCFILES))
67 install: $(INSTALLTARGETS)
69 # Make target: make a .deb file in ../
70 BUILDPACKAGE = -us -uc --build=full -Iolle
72 dpkg-buildpackage $(BUILDPACKAGE)
73 # PREFIX= INCLUDE_PREFIX=/usr