Skip to content

Commit

Permalink
Simplify Makefile rules
Browse files Browse the repository at this point in the history
  • Loading branch information
thiagokokada committed Dec 18, 2023
1 parent d54570a commit 806d268
Showing 1 changed file with 4 additions and 19 deletions.
23 changes: 4 additions & 19 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,24 +1,9 @@
all: bin/twenty-twenty-twenty-win-i386 bin/twenty-twenty-twenty-win-amd64 \
bin/twenty-twenty-twenty-macos-arm64 bin/twenty-twenty-twenty-macos-amd64 \
all: bin/twenty-twenty-twenty-windows-386 bin/twenty-twenty-twenty-windows-amd64 \
bin/twenty-twenty-twenty-darwin-arm64 bin/twenty-twenty-twenty-darwin-amd64 \
bin/twenty-twenty-twenty-linux-arm64 bin/twenty-twenty-twenty-linux-amd64

bin/twenty-twenty-twenty-win-i386: bin/twenty-twenty-twenty
GOOS=windows GOARCH=386 go build -o $@

bin/twenty-twenty-twenty-win-amd64: bin/twenty-twenty-twenty
GOOS=windows GOARCH=amd64 go build -o $@

bin/twenty-twenty-twenty-macos-arm64: bin/twenty-twenty-twenty
GOOS=darwin GOARCH=arm64 go build -o $@

bin/twenty-twenty-twenty-macos-amd64: bin/twenty-twenty-twenty
GOOS=darwin GOARCH=amd64 go build -o $@

bin/twenty-twenty-twenty-linux-arm64: bin/twenty-twenty-twenty
GOOS=linux GOARCH=arm64 go build -o $@

bin/twenty-twenty-twenty-linux-amd64: bin/twenty-twenty-twenty
GOOS=linux GOARCH=amd64 go build -o $@
bin/twenty-twenty-twenty-%: bin/twenty-twenty-twenty
GOOS=$(word 1,$(subst -, ,$*)) GOARCH=$(word 2,$(subst -, ,$*)) go build -o $@

bin/twenty-twenty-twenty: eye-solid.svg *.go go.mod go.sum
go test
Expand Down

0 comments on commit 806d268

Please sign in to comment.