Last active
March 26, 2019 09:30
-
-
Save fannheyward/d58f66c91f7f052e0a27acf2d700103a to your computer and use it in GitHub Desktop.
Makefile for go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ifndef VERBOSE | |
.SILENT: | |
endif | |
BINARY=$(shell basename $(CURDIR)) | |
BINARY_LINUX=$(BINARY)_linux | |
export GO111MODULE=on | |
.PHONY : default | |
default: build | |
install: | |
go clean && go install | |
build: | |
go clean && go build -o ${BINARY} | |
linux: | |
go clean && GOOS=linux GOARCH=amd64 go build -o ${BINARY_LINUX} | |
dev: | |
go get github.com/cespare/reflex | |
reflex -r '\.go$$' -s go run . |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment