2017-04-18 14:07:54 +00:00
|
|
|
VERSION := $(shell git describe --always --dirty=-dev)
|
2021-04-14 17:02:44 +00:00
|
|
|
COMMIT := $(shell git show-ref --hash refs/heads/master)
|
|
|
|
DATE := $(shell date --iso-8601=seconds --utc)
|
2018-03-29 18:08:41 +00:00
|
|
|
GOFILES = $(shell find . -type f -name '*.go')
|
2017-04-18 14:07:54 +00:00
|
|
|
|
2018-03-29 18:08:41 +00:00
|
|
|
all: cacert-boardvoting
|
|
|
|
|
2021-02-28 17:25:17 +00:00
|
|
|
cacert-boardvoting: ${GOFILES}
|
2021-04-14 17:02:44 +00:00
|
|
|
go build -o $@ -buildmode=pie -trimpath -x -ldflags " -s -w -X 'main.version=${VERSION}' -X 'main.commit=${COMMIT}' -X 'main.date=${DATE}'"
|
2017-04-18 14:07:54 +00:00
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f cacert-boardvoting
|
|
|
|
|
2018-03-29 18:08:41 +00:00
|
|
|
distclean: clean
|
|
|
|
rm -f boardvoting/assets.go
|
|
|
|
|
|
|
|
.PHONY: clean distclean all
|