Little_Library/Makefile

23 lines
529 B
Makefile

.DEFAULT_GOAL := protomolecule
.PHONY = fmt vet all clean deps benchmark
all: main
protomolecule:
go build -ldflags="-s -w -X main.GitVersion=git-$(shell git rev-list --count HEAD)-$(shell git rev-parse --short HEAD) -X main.BuildDate=$(shell date -u +%Y-%m-%dT%H:%M:%S%Z)"
install:
cp protomolecule /usr/local/bin/
uninstall:
rm /usr/local/bin/protomolecule
benchmark:
go test -bench=.
deps:
go mod tidy -v
fmt:
find . -name "*.go" -exec gofmt -s -w {} \;
vet:
go vet ./
clean:
rm protomolecule