1NAME = hii
2
3PREFIX ?= /usr/local
4BINDIR ?= $(PREFIX)/bin
5MANDIR ?= $(PREFIX)/share/man
6DOCDIR ?= $(PREFIX)/share/doc/$(NAME)
7
8$(NAME):
9 go build -o $@
10
11install: $(NAME) $(NAME).1 $(NAME).5 README.md
12 install -Dm755 $(NAME) "$(DESTDIR)$(BINDIR)/$(NAME)"
13 install -Dm644 $(NAME).1 "$(DESTDIR)$(MANDIR)/man1/$(NAME).1"
14 install -Dm644 $(NAME).5 "$(DESTDIR)$(MANDIR)/man5/$(NAME).5"
15 install -Dm644 README.md "$(DESTDIR)$(DOCDIR)/README.md"
16
17.PHONY: install $(NAME)