Last active
June 24, 2018 08:33
-
-
Save daniyel/d5e86f529c74189cfbca87da859059f1 to your computer and use it in GitHub Desktop.
Example Makefile for building go binary file for linux 64 platform
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
init: | |
./dep_wrapper.sh init | |
./dep_wrapper.sh ensure | |
ensure: | |
./dep_wrapper.sh ensure | |
build: | |
mkdir -p ./src | |
cp -R ./vendor/. ./src/ | |
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o ./target/mybinary ./source/myprogram.go | |
rm -rf ./src |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment