diff options
author | Martin Polden <mpolden@mpolden.no> | 2019-11-14 21:39:01 +0100 |
---|---|---|
committer | Martin Polden <mpolden@mpolden.no> | 2019-11-14 21:39:01 +0100 |
commit | 02a76677b452c41b1941e98ed03db992cfb86a2e (patch) | |
tree | 5a79ec2ee809b34fb9531bb8a5b09b32b6c59a26 | |
parent | 8cf43cb1eafaba004f19a4b5ff798cd328a7db96 (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)/atbapi + all: test vet lint install fmt: @@ -16,3 +20,13 @@ lint: 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) |