~egtann/sum

d069976967f191ee9b3ce4fae37fa31aff1ca8bb — Evan Tann 4 months ago 2650032
add makefile to install
1 files changed, 23 insertions(+), 0 deletions(-)

A Makefile
A Makefile => Makefile +23 -0
@@ 0,0 1,23 @@
BINDIR?=/usr/local/bin
MANDIR?=/usr/local/share/man

build:
	go build ./cmd/sf
.PHONY: build

install: build
	mkdir -m755 -p $(BINDIR) $(MANDIR)/man1 $(MANDIR)/man5
	cp man/man1/sf.1      /usr/local/share/man/man1/
	cp man/man5/sf.conf.5 /usr/local/share/man/man5/
	mv sf /usr/local/bin/sf
.PHONY: install

clean:
	rm -f sf
.PHONY: clean

uninstall:
	rm $(BINDIR)/sf
	rm -f $(MANDIR)/man1/sf.1
	rm -f $(MANDIR)/man5/sf.conf.5
.PHONY: uninstall