diff --git a/golang.mk b/golang.mk index cded8a2d9..26b1b0df1 100644 --- a/golang.mk +++ b/golang.mk @@ -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 @@ -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 \