From 8776f4162781b99187f4a6a6264e3bb28e17b760 Mon Sep 17 00:00:00 2001 From: Ivan Daniluk Date: Wed, 29 Nov 2017 22:30:16 +0100 Subject: [PATCH] Add a Makefile target for compilation into library (#475) This PR adds a new target to Makefile to build a static library. --- Makefile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Makefile b/Makefile index a3047648c..e0cc986aa 100644 --- a/Makefile +++ b/Makefile @@ -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 @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: docker pull farazdagi/xgo go get github.com/karalabe/xgo