1
0
mirror of https://github.com/osmarks/mycorrhiza.git synced 2024-10-30 03:36:16 +00:00
mycorrhiza/Makefile
2022-08-17 11:13:57 +03:00

23 lines
588 B
Makefile

.POSIX:
.SUFFIXES:
PREFIX=/usr/local
BINDIR=$(PREFIX)/bin
MANDIR=$(PREFIX)/share/man
GO=go
TAGGED_RELEASE!=git describe --tags --abbrev=0
LDFLAGS=-X "github.com/bouncepaw/mycorrhiza/version.taggedRelease=$(TAGGED_RELEASE)"
all: mycorrhiza
mycorrhiza:
$(GO) generate $(GOFLAGS)
CGO_ENABLED=0 $(GO) build -ldflags="$(LDFLAGS)" $(GOFLAGS) -o mycorrhiza .
install:
mkdir -m755 -p $(DESTDIR)$(BINDIR) $(DESTDIR)$(MANDIR)/man1
install -m755 mycorrhiza $(DESTDIR)$(BINDIR)/mycorrhiza
install -m644 help/mycorrhiza.1 $(DESTDIR)$(MANDIR)/man1/mycorrhiza.1
.PHONY: all mycorrhiza install