summaryrefslogtreecommitdiff
path: root/Makefile
blob: f83e9980ad3af1e4f0ff97f165d0f7c5a561a2a2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
VERSION := $(shell git describe --always --dirty=-dev)
COMMIT := $(shell git show-ref --hash refs/heads/master)
DATE := $(shell date --iso-8601=seconds --utc)
GOFILES = $(shell find . -type f -name '*.go')

all: cacert-boardvoting

cacert-boardvoting: ${GOFILES}
	go build -o $@ -buildmode=pie -trimpath -x -ldflags " -s -w -X 'main.version=${VERSION}' -X 'main.commit=${COMMIT}' -X 'main.date=${DATE}'"

clean:
	rm -f cacert-boardvoting

distclean: clean
	rm -f boardvoting/assets.go

.PHONY: clean distclean all