VERSION = $(shell git describe --tags) BUILDTIME = $(shell date +%s) all: install go-build: goimports GO111MODULE=off go build \ -ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}" install: goimports GO111MODULE=off go install \ -ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}" install-verbose: goimports GO111MODULE=off go install -v -x \ -ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}" generate: clean go mod init go mod tidy go generate go-generate: rm -f *.pb.go *.patch vet: @GO111MODULE=off go vet @echo this go library package builds okay # autofixes your import headers in your golang files goimports: goimports -w *.go clean: rm -f *.pb.go *.patch -rm -f go.* -go-mod-clean purge