Skip to content

Commit

Permalink
Merge pull request #69 from SamWhited/simplify_makefile
Browse files Browse the repository at this point in the history
Simplify the Makefile to make it more portable
  • Loading branch information
ddymko authored Dec 19, 2019
2 parents 23fbaa4 + 2673c5d commit e1ef8b4
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 47 deletions.
47 changes: 0 additions & 47 deletions GNUmakefile

This file was deleted.

30 changes: 30 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
.PHONY: remove format

export CGO=0
export GOFLAGS=-mod=vendor -trimpath

DIR?=builds

$(DIR):
mkdir -p $(DIR)

$(DIR)/vultr-cli_darwin_amd64: $(DIR)
env GOOS=darwin GOARCH=amd64 go build -o $@

$(DIR)/vultr-cli_linux_386: $(DIR)
env GOOS=linux GOARCH=386 go build -o $@

$(DIR)/vultr-cli_linux_amd64: $(DIR)
env GOOS=linux GOARCH=amd64 go build -o $@

$(DIR)/vultr-cli_windows_386.exe: $(DIR)
env GOOS=windows GOARCH=386 go build -o $@

$(DIR)/vultr-cli_windows_amd64.exe: $(DIR)
env GOOS=windows GOARCH=amd64 go build -o $@

remove:
@rm -rf builds

format:
@go fmt ./...

0 comments on commit e1ef8b4

Please sign in to comment.