Skip to content
This repository has been archived by the owner on Oct 15, 2024. It is now read-only.

Commit

Permalink
Build binaries for Windows & ARM (#548)
Browse files Browse the repository at this point in the history
  • Loading branch information
der-eismann authored Sep 7, 2020
1 parent 0d7db11 commit 3ac36c6
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions golang.mk
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ BUILD_FLAGS=-ldflags "\
GOFILES=$(shell find . -type f -name '*.go' -not -path "./vendor/*" -not -path "./.git/*")
GOPKGS=$(shell go list ./...)

OUTPUT_FILE=$(NAME)-$(BUILD_VERSION)-$(shell go env GOOS)-$(shell go env GOARCH)$(shell go env GOEXE)
OUTPUT_FILE=$(NAME)-$(BUILD_VERSION)-$(shell go env GOOS)-$(shell go env GOARCH)$(shell go env GOARM)$(shell go env GOEXE)
OUTPUT_LINK=$(NAME)$(shell go env GOEXE)

default: build
Expand Down Expand Up @@ -69,11 +69,15 @@ build: go_generate _build
$(foreach TARGET,$(TARGETS),ln -sf $(OUTPUT_FILE) dist/$(OUTPUT_LINK);)

compress: _build
tar czf dist/$(OUTPUT_FILE).tar.gz dist/$(OUTPUT_FILE)
tar czf dist/$(OUTPUT_FILE).tar.gz -C dist $(OUTPUT_FILE)
rm -f dist/$(OUTPUT_FILE)

xc: go_generate
GOOS=linux GOARCH=amd64 make compress
GOOS=linux GOARCH=arm64 make compress
GOOS=linux GOARCH=arm GOARM=7 make compress
GOOS=darwin GOARCH=amd64 make compress
GOOS=windows GOARCH=amd64 make compress

install: test
$(foreach TARGET,$(TARGETS),go install \
Expand Down

0 comments on commit 3ac36c6

Please sign in to comment.