2021-10-26 05:45:28 +00:00
|
|
|
.POSIX:
|
2022-03-24 15:42:55 +00:00
|
|
|
.SUFFIXES:
|
2021-05-27 10:17:42 +00:00
|
|
|
|
2022-03-24 15:42:55 +00:00
|
|
|
PREFIX=/usr/local
|
2022-03-24 17:56:19 +00:00
|
|
|
BINDIR=$(PREFIX)/bin
|
2022-03-24 15:42:55 +00:00
|
|
|
MANDIR=$(PREFIX)/share/man
|
|
|
|
GO=go
|
2022-09-07 09:50:48 +00:00
|
|
|
LDFLAGS=-X "github.com/bouncepaw/mycorrhiza/version.taggedRelease=$$(git describe --tags --abbrev=0)"
|
2021-11-10 14:05:33 +00:00
|
|
|
|
2022-03-24 15:42:55 +00:00
|
|
|
all: mycorrhiza
|
2021-11-10 12:50:54 +00:00
|
|
|
|
2022-03-24 15:42:55 +00:00
|
|
|
mycorrhiza:
|
|
|
|
$(GO) generate $(GOFLAGS)
|
2022-08-17 08:13:57 +00:00
|
|
|
CGO_ENABLED=0 $(GO) build -ldflags="$(LDFLAGS)" $(GOFLAGS) -o mycorrhiza .
|
2021-11-10 14:05:33 +00:00
|
|
|
|
2022-03-24 15:42:55 +00:00
|
|
|
install:
|
2022-03-24 17:56:19 +00:00
|
|
|
mkdir -m755 -p $(DESTDIR)$(BINDIR) $(DESTDIR)$(MANDIR)/man1
|
|
|
|
install -m755 mycorrhiza $(DESTDIR)$(BINDIR)/mycorrhiza
|
2022-03-26 15:54:01 +00:00
|
|
|
install -m644 help/mycorrhiza.1 $(DESTDIR)$(MANDIR)/man1/mycorrhiza.1
|
2021-11-10 12:50:54 +00:00
|
|
|
|
2022-03-24 15:42:55 +00:00
|
|
|
.PHONY: all mycorrhiza install
|