From 31d7c63114b752474680fe72f35d7d890db8eafe Mon Sep 17 00:00:00 2001 From: Sasha Koshka Date: Fri, 11 Oct 2024 16:26:59 -0400 Subject: [PATCH] Add Makefile --- Makefile | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..4e6dc3f --- /dev/null +++ b/Makefile @@ -0,0 +1,30 @@ +.POSIX: +.SUFFIXES: +HARE=hare +HAREFLAGS= + +DESTDIR= +PREFIX=/usr/local +BINDIR=$(PREFIX)/bin +MANDIR=$(PREFIX)/share/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/*.1 $(DESTDIR)$(MANDIR)/man1 + +uninstall: + rm -f $(DESTDIR)$(BINDIR)/bulb + +.PHONY: all check clean install uninstall