34 lines
586 B
Makefile
34 lines
586 B
Makefile
.POSIX:
|
|
.SUFFIXES:
|
|
HARE=hare
|
|
HAREFLAGS=
|
|
|
|
DESTDIR=
|
|
PREFIX=/usr/local
|
|
BINDIR=$(PREFIX)/bin
|
|
MANDIR!=test $(PREFIX)/share/man && \
|
|
printf $(PREFIX)/share/man || \
|
|
printf $(PREFIX)/man
|
|
|
|
all: bulb
|
|
|
|
bulb:
|
|
$(HARE) build $(HAREFLAGS) -o $@ cmd/$@/
|
|
|
|
check:
|
|
$(HARE) test $(HAREFLAGS)
|
|
|
|
clean:
|
|
rm -f bulb
|
|
|
|
install:
|
|
mkdir -p $(DESTDIR)$(BINDIR) $(DESTDIR)$(MANDIR)/man1
|
|
install -Dm755 bulb $(DESTDIR)$(BINDIR)/bulb
|
|
install -Dm755 doc/bulb.1 $(DESTDIR)$(MANDIR)/man1
|
|
|
|
uninstall:
|
|
rm -f $(DESTDIR)$(BINDIR)/bulb
|
|
rm -f $(DESTDIR)$(MANDIR)/man1/bulb.1
|
|
|
|
.PHONY: all check clean install uninstall
|