-
-
Notifications
You must be signed in to change notification settings - Fork 177
/
Makefile
50 lines (40 loc) · 1011 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
47
48
49
50
#
# vm-bhyve Makefile
#
PREFIX?=/usr/local
BINDIR=$(DESTDIR)$(PREFIX)/sbin
EXAMPLESDIR=$(DESTDIR)${PREFIX}/share/examples/vm-bhyve
LIBDIR=$(DESTDIR)$(PREFIX)/lib/vm-bhyve
MANDIR=$(DESTDIR)$(PREFIX)/man/man8
RCDIR=$(DESTDIR)$(PREFIX)/etc/rc.d
CP=/bin/cp
INSTALL=/usr/bin/install
LN=/bin/ln
MKDIR=/bin/mkdir
PROG=vm
MAN=$(PROG).8
install:
$(MKDIR) -p $(BINDIR)
$(INSTALL) -m 544 $(PROG) $(BINDIR)/
$(MKDIR) -p $(LIBDIR)
$(INSTALL) lib/* $(LIBDIR)/
$(MKDIR) -p $(EXAMPLESDIR)
$(INSTALL) sample-templates/* $(EXAMPLESDIR)/
$(MKDIR) -p $(RCDIR)
$(INSTALL) -m 555 rc.d/* $(RCDIR)/
$(MKDIR) -p $(MANDIR)
gzip -fk $(MAN)
$(INSTALL) $(MAN).gz $(MANDIR)/
rm -f -- $(MAN).gz
$(LN) -sf $(MANDIR)/$(MAN).gz $(MANDIR)/vm-bhyve.8.gz
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: ;