Skip to content

Commit

Permalink
let default make target just build for current system
Browse files Browse the repository at this point in the history
  • Loading branch information
specious committed Jul 5, 2021
1 parent 1bbbd6f commit f3b60e6
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
build: ensure-dir build-linux build-windows build-darwin compress
default: clean bindir
go build -o bin/scrape *.go

ensure-dir: clean
amd64: clean bindir linux windows darwin compress

bindir:
mkdir bin

build-linux:
linux:
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -o bin/scrape.linux-amd64 *.go

build-windows:
windows:
GOOS=windows GOARCH=amd64 CGO_ENABLED=0 go build -o bin/scrape.windows-amd64.exe *.go

build-darwin:
darwin:
GOOS=darwin GOARCH=amd64 CGO_ENABLED=0 go build -o bin/scrape.darwin-amd-64 *.go

compress:
Expand Down

0 comments on commit f3b60e6

Please sign in to comment.