Add a Makefile target for compilation into library (#475)

This PR adds a new target to Makefile to build a static library.
This commit is contained in:
Ivan Daniluk 2017-11-29 22:30:16 +01:00 committed by Adam Babik
parent d6d5945ab4
commit 8776f41627
1 changed files with 6 additions and 0 deletions

View File

@ -63,6 +63,12 @@ statusgo-ios-simulator: xgo ##@cross-compile Build status-go for iOS Simulator
$(GOPATH)/bin/xgo --image farazdagi/xgo-ios-simulator --go=$(GO) -out statusgo --dest=$(GOBIN) --targets=ios-9.3/framework -v $(shell build/testnet-flags.sh) ./lib $(GOPATH)/bin/xgo --image farazdagi/xgo-ios-simulator --go=$(GO) -out statusgo --dest=$(GOBIN) --targets=ios-9.3/framework -v $(shell build/testnet-flags.sh) ./lib
@echo "iOS framework cross compilation done." @echo "iOS framework cross compilation done."
statusgo-library: ##@cross-compile Build status-go as static library for current platform
@echo "Building static library..."
go build -buildmode=c-archive -o $(GOBIN)/libstatus.a ./lib
@echo "Static library built:"
@ls -la $(GOBIN)/libstatus.*
xgo: xgo:
docker pull farazdagi/xgo docker pull farazdagi/xgo
go get github.com/karalabe/xgo go get github.com/karalabe/xgo