diff options
author | Martin Polden <mpolden@mpolden.no> | 2019-11-14 22:03:21 +0100 |
---|---|---|
committer | Martin Polden <mpolden@mpolden.no> | 2019-11-14 22:03:21 +0100 |
commit | 363b45b129e3c27f86313e28f01aff371c47d960 (patch) | |
tree | a14ee1df3c4f868e4f412f8092e9754e120f9e8b | |
parent | 04f3d23a0b49feab2c5ab92333926e58072004a4 (diff) |
Add cross-compile target
-rw-r--r-- | Makefile | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -1,3 +1,7 @@ +XGOARCH := amd64 +XGOOS := linux +XBIN := $(XGOOS)_$(XGOARCH)/lftpq + all: lint test install deps: @@ -16,3 +20,13 @@ lint: check-fmt vet install: go install ./... + +xinstall: + env GOOS=$(XGOOS) GOARCH=$(XGOARCH) go install ./... + +publish: +ifndef DEST_PATH + $(error DEST_PATH must be set when publishing) +endif + rsync -a $(GOPATH)/bin/$(XBIN) $(DEST_PATH)/$(XBIN) + @sha256sum $(GOPATH)/bin/$(XBIN) |