Merge pull request #17 from farazdagi/develop
32 bit & 64 bit status-go for iOS #16
This commit is contained in:
commit
f959259278
19
Makefile
19
Makefile
|
@ -1,3 +1,6 @@
|
||||||
|
.PHONY: statusgo all test xgo clean
|
||||||
|
.PHONY: statusgo-android statusgo-ios
|
||||||
|
|
||||||
GOBIN = build/bin
|
GOBIN = build/bin
|
||||||
GO ?= latest
|
GO ?= latest
|
||||||
|
|
||||||
|
@ -6,9 +9,23 @@ statusgo:
|
||||||
@echo "status go compilation done."
|
@echo "status go compilation done."
|
||||||
@echo "Run \"build/bin/statusgo\" to view available commands"
|
@echo "Run \"build/bin/statusgo\" to view available commands"
|
||||||
|
|
||||||
|
statusgo-cross: statusgo-android statusgo-ios
|
||||||
|
@echo "Full cross compilation done:"
|
||||||
|
@ls -ld $(GOBIN)/statusgo-*
|
||||||
|
|
||||||
statusgo-android: xgo
|
statusgo-android: xgo
|
||||||
build/env.sh $(GOBIN)/xgo --go=$(GO) -out statusgo --dest=$(GOBIN) --targets=android-16/aar ./src
|
build/env.sh $(GOBIN)/xgo --go=$(GO) -out statusgo --dest=$(GOBIN) --targets=android-16/aar -v $(shell build/flags.sh) ./src
|
||||||
@echo "Android cross compilation done:"
|
@echo "Android cross compilation done:"
|
||||||
|
|
||||||
|
statusgo-ios: xgo
|
||||||
|
build/env.sh $(GOBIN)/xgo --go=$(GO) -out statusgo --dest=$(GOBIN) --targets=ios-7.0/framework -v $(shell build/flags.sh) ./src
|
||||||
|
@echo "iOS framework cross compilation done:"
|
||||||
|
|
||||||
xgo:
|
xgo:
|
||||||
build/env.sh go get github.com/karalabe/xgo
|
build/env.sh go get github.com/karalabe/xgo
|
||||||
|
|
||||||
|
test:
|
||||||
|
build/env.sh go test ./...
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -fr $(GOBIN)/*
|
||||||
|
|
|
@ -0,0 +1,22 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
if [ ! -f "build/env.sh" ]; then
|
||||||
|
echo "$0 must be run from the root of the repository."
|
||||||
|
exit 2
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Since Go 1.5, the separator char for link time assignments
|
||||||
|
# is '=' and using ' ' prints a warning. However, Go < 1.5 does
|
||||||
|
# not support using '='.
|
||||||
|
sep=$(go version | awk '{ if ($3 >= "go1.5" || index($3, "devel")) print "="; else print " "; }' -)
|
||||||
|
|
||||||
|
# set gitCommit when running from a Git checkout.
|
||||||
|
if [ -f ".git/HEAD" ]; then
|
||||||
|
echo "-ldflags '-X main.gitCommit$sep$(git rev-parse HEAD)'"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -z "$GO_OPENCL" ]; then
|
||||||
|
echo "-tags opencl"
|
||||||
|
fi
|
Loading…
Reference in New Issue