2016-07-20 06:42:19 +00:00
|
|
|
.PHONY: statusgo all test xgo clean
|
|
|
|
.PHONY: statusgo-android statusgo-ios
|
|
|
|
|
2016-06-18 18:28:08 +00:00
|
|
|
GOBIN = build/bin
|
2016-06-17 11:55:54 +00:00
|
|
|
GO ?= latest
|
|
|
|
|
|
|
|
statusgo:
|
2016-07-20 06:42:19 +00:00
|
|
|
build/env.sh go build -i -o $(GOBIN)/statusgo -v $(shell build/flags.sh) ./src
|
2016-06-18 18:28:08 +00:00
|
|
|
@echo "status go compilation done."
|
|
|
|
@echo "Run \"build/bin/statusgo\" to view available commands"
|
2016-06-17 11:55:54 +00:00
|
|
|
|
2016-07-20 06:42:19 +00:00
|
|
|
statusgo-cross: statusgo-android statusgo-ios
|
|
|
|
@echo "Full cross compilation done:"
|
|
|
|
@ls -ld $(GOBIN)/statusgo-*
|
|
|
|
|
2016-06-17 11:55:54 +00:00
|
|
|
statusgo-android: xgo
|
2016-07-20 06:42:19 +00:00
|
|
|
build/env.sh $(GOBIN)/xgo --image farazdagi/xgo --go=$(GO) -out statusgo --dest=$(GOBIN) --targets=android-16/aar -v $(shell build/flags.sh) ./src
|
2016-06-17 11:55:54 +00:00
|
|
|
@echo "Android cross compilation done:"
|
|
|
|
|
2016-07-20 06:42:19 +00:00
|
|
|
statusgo-ios: xgo
|
|
|
|
build/env.sh $(GOBIN)/xgo --image farazdagi/xgo --go=$(GO) -out statusgo --dest=$(GOBIN) --targets=ios-9.3/framework -v $(shell build/flags.sh) ./src
|
|
|
|
@echo "iOS framework cross compilation done:"
|
|
|
|
|
|
|
|
statusgo-ios-simulator: xgo
|
|
|
|
build/env.sh $(GOBIN)/xgo --image farazdagi/xgo-ios-simulator --go=$(GO) -out statusgo --dest=$(GOBIN) --targets=ios-9.3/framework -v $(shell build/flags.sh) ./src
|
|
|
|
@echo "iOS framework cross compilation done:"
|
|
|
|
|
2016-06-17 11:55:54 +00:00
|
|
|
xgo:
|
2016-06-18 18:28:08 +00:00
|
|
|
build/env.sh go get github.com/karalabe/xgo
|
2016-07-20 06:42:19 +00:00
|
|
|
|
|
|
|
test:
|
|
|
|
build/env.sh go test -v -coverprofile=cover.out ./src
|
|
|
|
|
|
|
|
test-cover: test
|
|
|
|
build/env.sh go tool cover -html=cover.out -o cover.html
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -fr build/bin/*
|