add cross-compile setup task

This commit is contained in:
Cory Bennett
2015-07-01 09:13:03 -07:00
parent 87ab7291e1
commit 91c57d496c
+8 -1
View File
@@ -20,13 +20,20 @@ build:
cd src/github.com/Netflix-Skunkworks/go-jira/jira; \ cd src/github.com/Netflix-Skunkworks/go-jira/jira; \
go get -v go get -v
cross-setup:
for p in $(PLATFORMS); do \
echo "Building for $$p"; \
cd $(GOROOT)/src && sudo GOOS=$${p/-*/} GOARCH=$${p/*-/} bash ./make.bash --no-clean; \
done
all: all:
mkdir -p $(DIST); \ mkdir -p $(DIST); \
cd src/github.com/Netflix-Skunkworks/go-jira/jira; \ cd src/github.com/Netflix-Skunkworks/go-jira/jira; \
go get -d; \ go get -d; \
for p in $(PLATFORMS); do \ for p in $(PLATFORMS); do \
echo "Building for $$p"; \ echo "Building for $$p"; \
GOOS=$${p/-*/} GOARCH=$${p/*-/} go build -v -ldflags -s -o $(DIST)/jira-$$p; \ cd $(GOPATH)/src/github.com/Netflix-Skunkworks/go-jira/jira GOOS=$${p/-*/} GOARCH=$${p/*-/} go build -v -ldflags -s -o $(DIST)/jira-$$p; \
done done
fmt: fmt: