vm-bhyve-laylo/Makefile

51 lines
1023 B
Makefile
Raw Permalink Normal View History

2023-05-28 10:49:27 +02:00
#
2023-05-28 11:28:58 +02:00
# vm-bhyve-laylo Makefile
2023-05-28 10:49:27 +02:00
#
PREFIX?=/usr/local
BINDIR=$(DESTDIR)$(PREFIX)/sbin
2023-05-28 11:28:58 +02:00
EXAMPLESDIR=$(DESTDIR)${PREFIX}/share/examples/vm-bhyve-laylo
2023-05-28 10:49:27 +02:00
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: ;