Skip to content

Instantly share code, notes, and snippets.

@JohnMurray
Last active January 23, 2018 14:44
Show Gist options
  • Save JohnMurray/3f40338472a139c0c1012a43e52d4307 to your computer and use it in GitHub Desktop.
Save JohnMurray/3f40338472a139c0c1012a43e52d4307 to your computer and use it in GitHub Desktop.
A simple makefile for a blog post
BUILD_OPTS=-p4 -race
BIN_NAME=my_app
default: test
.PHONY: test
test: compile
@echo
@echo "[running tests]"
@go test -v ./...
.PHONY: compile
compile:
@echo
@echo "[compiling]"
go build $(BUILD_OPTS) -o $(BIN_NAME)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment