Skip to content

Instantly share code, notes, and snippets.

@L-P
Created December 13, 2018 17:29
Embed
What would you like to do?
Generic golang command Makefile
VERSION=$(shell git describe --tags)
BUILDFLAGS=-ldflags '-X main.Version=${VERSION}'
EXEC=$(shell basename "$(shell pwd)")
all: $(EXEC)
$(EXEC):
go build ${BUILDFLAGS}
.PHONY: $(EXEC)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment