Skip to content

Instantly share code, notes, and snippets.

@L-P

L-P/Makefile

Created Dec 13, 2018
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