GO ?= go GOFLAGS ?= -v -ldflags "-w -X `go list`.Version=${VERSION} -X `go list`.Commit=${COMMIT} -X `go list`.Build=${BUILD}" CGO ?= 0 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` PREFIX ?= /usr/local all: marisa marisa-trash marisa: CGO_ENABLED=${CGO} go build ${GOFLAGS} ./cmd/marisa marisa-trash: CGO_ENABLED=${CGO} go build ${GOFLAGS} ./cmd/marisa-trash clean: rm -f marisa marisa-trash install: install -Dm0755 marisa ${PREFIX}/bin/marisa install -Dm0755 marisa-trash ${PREFIX}/bin/marisa-trash install -Dm0644 marisa.1 ${PREFIX}/share/man/man1/marisa.1 install -Dm0644 marisa.conf.5 ${PREFIX}/share/man/man5/marisa.conf.5 .PHONY: marisa marisa-trash