blurp/Makefile
decentral1se 724a1f2a61
All checks were successful
continuous-integration/drone/push Build is passing
chore: remove cruft
2024-08-10 14:32:43 +02:00

26 lines
500 B
Makefile

PROG := blurp
COMMIT := $(shell git rev-list -1 HEAD)
GCFLAGS := -gcflags="all=-l -B"
LDFLAGS := -ldflags="-X 'main.Commit=$(COMMIT)' -s -w"
ALLFLAGS := -v $(GCFLAGS) $(LDFLAGS)
default: build
check:
@test -z $$(gofmt -l .) || \
(echo "gofmt: formatting issue - run 'make format' to resolve" && exit 1)
format:
@gofmt -s -w .
build: check
@go build $(ALLFLAGS) .
upx:
@upx --lzma ./$(PROG)
deps:
@go get -t -u ./...
.PHONY: check format build install test clean upx release deps