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 VARLIBFILES = overlay-boot overlay-go overlay-stop functions reaper
9 VARLIBFILES += overlay-init overlay-postmount overlay-premount
10 VARLIBFILES += overlay-diskfile
12 ETCFILES = subhosts.conf
14 # The default is to build asm/reaper
18 # Specific rule: $(REAPER) is ensured by "recursive make"
20 $(MAKE) -C $$(dirname $(REAPER)) reaper
22 # Specific rule: the reaper program originates from $(REAPER)
26 # Specific rule: the sysvinit init file
27 $(INITDIR)/subhosts: subhosts.sh | $(INITDIR)/
30 # Specific rule: the sysvinit init configuration file
31 $(ETCDIR)/subhosts.conf: subhosts.conf | $(ETCDIR)/
34 # Generic rule: any dependee directory needs to be created
38 # Generic rule: a local .8 file depends on the same .8.adoc file, if any
39 $(MAN8FILES): %: %.adoc
40 a2x -d manpage -f manpage $^
42 # Generic rule: an installed MAN8FILE file depends on a local the
43 # same, and that the installation directory exists
44 $(addprefix $(MAN8DIR)/,$(MAN8FILES)): $(MAN8DIR)/%: % | $(MAN8DIR)/
47 # Generic rule: an installed VARLIBFILES file depends on a local the
48 # same, and that the installation directory exists
49 $(addprefix $(VARLIBDIR)/,$(VARLIBFILES)): $(VARLIBDIR)/%: % | $(VARLIBDIR)/
52 # Make target: to clean up this workspace
55 make -C $$(dirname $(REAPER)) clean
57 .INTERMEDIATE: reaper $(MAN8FILES)
59 # Make target: enumerates that which should be installed
60 INSTALLTARGETS += $(addprefix $(MAN8DIR)/,$(MAN8FILES))
61 INSTALLTARGETS += $(addprefix $(VARLIBDIR)/,$(VARLIBFILES))
62 INSTALLTARGETS += $(addprefix $(INITDIR)/,$(INITFILES))
64 install: $(INSTALLTARGETS)
66 # Make target: make a .deb file in ../
67 BUILDPACKAGE = -us -uc --build=full -Iolle
69 dpkg-buildpackage $(BUILDPACKAGE)
70 # PREFIX= INCLUDE_PREFIX=/usr