Created
July 18, 2019 19:44
-
-
Save AxelRHD/1cf2bad7c1e8359f4db8fd1d9c2aec54 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
# Go | |
GOCMD=go | |
XGO=xgo | |
GOBUILD=$(GOCMD) build | |
GOCLEAN=$(GOCMD) clean | |
BINARY_NAME=my-app | |
exec: run clean | |
build: | |
$(GOBUILD) -o $(BINARY_NAME) -v | |
run: | |
$(GOBUILD) -o $(BINARY_NAME) -v ./... | |
./$(BINARY_NAME) | |
clean: | |
$(GOCLEAN) | |
rm -f $(BINARY_NAME)* | |
build-win: | |
$(XGO) --targets=windows-6.1/* -out $(BINARY_NAME) . |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment