forked from churchers/vm-bhyve
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
46 lines (41 loc) · 917 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#
# vm-bhyve Makefile
#
PREFIX?=/usr/local
MAN=
BINOWN=root
BINGRP=wheel
BINMODE=0500
BINDIR=$(PREFIX)/sbin
FILESDIR=$(PREFIX)/lib/vm-bhyve
EXAMPLESDIR=${PREFIX}/share/examples/vm-bhyve
RCDIR=$(PREFIX)/etc/rc.d
MANDIR=$(PREFIX)/man/man8
MKDIR=/bin/mkdir
CP=/bin/cp
PROG=vm
MAN=$(PROG).8
install:
$(MKDIR) -p $(BINDIR)
$(MKDIR) -p $(FILESDIR)
$(MKDIR) -p $(EXAMPLESDIR)
$(MKDIR) -p $(RCDIR)
$(MKDIR) -p $(MANDIR)
$(INSTALL) -m $(BINMODE) $(PROG) $(BINDIR)/
$(INSTALL) lib/* $(FILESDIR)/
$(INSTALL) sample-templates/* $(EXAMPLESDIR)/
$(INSTALL) -m 555 rc.d/* $(RCDIR)/
rm -f $(MAN).gz
gzip -k $(MAN)
$(INSTALL) $(MAN).gz $(MANDIR)/
vmdir:
@if [ -z "${PATH}" ]; then \
echo "Usage: make vmdir PATH=/path"; \
else \
${MKDIR} -p "${PATH}/.templates"; \
${MKDIR} -p "${PATH}/.iso"; \
${MKDIR} -p "${PATH}/.config"; \
${CP} sample-templates/* "${PATH}/.templates/"; \
fi;
.MAIN: clean
clean: ;