PREFIX ?= /usr/local GOFLAGS ?= -v -ldflags "-w -X `go list`.Version=${VERSION} -X `go list`.Commit=${COMMIT} -X `go list`.Build=${BUILD}" -tags "static_build" BRANCH = `git rev-parse --abbrev-ref HEAD` BUILD = `git show -s --pretty=format:%cI` COMMIT = `git rev-parse --short HEAD || echo "$COMMIT"` VERSION = `git describe --abbrev=0 --tags 2>/dev/null || echo "$VERSION"` all: suwako suwako: go build ${GOFLAGS} ./cmd/suwako clean: rm -f suwako install: install -Dm0755 suwako ${PREFIX}/bin/suwako install -Dm0644 suwako.1 ${PREFIX}/share/man/man1/suwako.1 install -Dm0644 suwako.conf.5 ${PREFIX}/share/man/man5/suwako.conf.5 uninstall: rm -f ${PREFIX}/bin/suwako rm -f ${PREFIX}/share/man/man1/suwako.1