From 06bec467f1db4ba929fbdd2e7caf2a9a461652e6 Mon Sep 17 00:00:00 2001 From: Kevin Schoon Date: Thu, 1 Feb 2018 15:20:22 -0500 Subject: [PATCH] support OSX cross compilation --- Makefile | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 3016449..7e1ee97 100644 --- a/Makefile +++ b/Makefile @@ -22,8 +22,14 @@ test: go test ./... go vet ./... -release: bin bindata.go - go build -ldflags "-X main.Version=$(VERSION)" -o bin/pomo-$(VERSION)-linux +release-linux: bin bindata.go + go build -ldflags "-X main.Version=$(VERSION)" -o bin/pomo-$(VERSION)-linux-amd64 + +release-osx: bin bindata.go + # This is used to cross-compile a Darwin compatible Mach-O executable + # on Linux for OSX, you need to install https://github.com/tpoechtrager/osxcross + PATH="$$PATH:/usr/local/osx-ndk-x86/bin" GOOS=darwin GOARCH=amd64 CC=/usr/local/osx-ndk-x86/bin/x86_64-apple-darwin15-cc CGO_ENABLED=1 go build $(FLAGS) -o bin/pomo-$(VERSION)-darwin-amd64 + docs: readme cd www && hugo -d ../docs