DESTDIR ?= GOFLAGS ?= -v -buildvcs=false -mod=vendor -buildmode=exe -ldflags "-w -X `go list`.Date=${DATE} -X `go list`.Vendor=${GOOS} -X `go list`.Version=${VERSION}" PREFIX ?= /usr/local DATE ?= `date -u +%F` GOOS ?= `go env GOOS` GOARCH ?= `go env GOARCH` VERSION ?= `git describe --tags` build: env GOOS=${GOOS} GOARCH=${GOARCH} go build ${GOFLAGS} -o aya-${GOOS}-${GOARCH} ./cmd/aya clean: rm -f aya-${GOOS}-${GOARCH} dist: git archive --format=tar.gz --output=aya-${VERSION}.tar.gz HEAD install: install -Dm0755 aya-${GOOS}-${GOARCH} ${DESTDIR}${PREFIX}/bin/aya install -Dm0644 aya.1 ${DESTDIR}${PREFIX}/share/man/man1/aya.1 uninstall: rm -f ${PREFIX}/bin/aya-${GOOS}-${GOARCH} rm -f ${PREFIX}/share/man/man1/aya.1