heimdall/Makefile
Evan Hazlett f0c2ae6902
initial commit
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2019-09-12 23:08:41 -04:00

15 lines
437 B
Makefile

COMMIT=$(shell git rev-parse HEAD | head -c 8)$(shell if ! git diff --no-ext-diff --quiet --exit-code; then echo .m; fi)
APP=gatekeeper
BUILD=-dev
REPO=ehazlett/$(APP)
all: build
build:
@>&2 echo " -> building ${COMMIT}"
@CGO_ENABLED=0 go build -installsuffix cgo -ldflags "-w -X github.com/$(REPO)/version.GitCommit=$(COMMIT) -X github.com/$(REPO)/version.Build=$(BUILD)" -o ./bin/$(APP) .
clean:
@rm -rf bin
.PHONY: build clean