GO ?= go GOFLAGS ?= -v -ldflags "-w -X `go list`.Version=$(VERSION) -X `go list`.Commit=$(COMMIT) -X `go list`.Build=$(BUILD)" -tags "static_build" PREFIX ?= /usr/local VERSION = `git describe --abbrev=0 --tags 2>/dev/null || echo "$VERSION"` COMMIT = `git rev-parse --short HEAD || echo "$COMMIT"` BRANCH = `git rev-parse --abbrev-ref HEAD` BUILD = `git show -s --pretty=format:%cI` GOARCH ?= amd64 GOOS ?= linux all: toyohime toyohime: ${GO} build ${GOFLAGS} ./cmd/toyohime clean: rm toyohime install: install -m0755 toyohime ${DESTDIR}${PREFIX}/bin/yorihime install -Dm0044 toyohime.1 ${DESTDIR}${PREFIX}/share/man/man1/toyohime.1 test: ${GO} test . uninstall: rm -f ${DESTDIR}${PREFIX}/bin/toyohime rm -f ${DESTDIR}${PREFIX}/share/man/man1/toyohime.1