go-pulse/Makefile

69 lines
2.2 KiB
Makefile
Raw Permalink Normal View History

# This Makefile is meant to be used by people that do not usually work
# with Go source code. If you know what GOPATH is then you probably
# don't need to bother with make.
.PHONY: geth android ios evm all test clean
2021-10-26 22:55:11 +00:00
.PHONY: docker-all docker docker-alltools docker-debug
GOBIN = ./build/bin
GO ?= latest
GORUN = env GO111MODULE=on go run
geth:
$(GORUN) build/ci.go install ./cmd/geth
@echo "Done building."
@echo "Run \"$(GOBIN)/geth\" to launch geth."
geth-debug:
$(GORUN) build/ci.go install -debug ./cmd/geth
@echo "Done building debug."
@echo "Run \"$(GOBIN)/geth\" to launch geth."
all:
$(GORUN) build/ci.go install
android:
$(GORUN) build/ci.go aar --local
@echo "Done building."
@echo "Import \"$(GOBIN)/geth.aar\" to use the library."
2021-08-17 16:11:50 +00:00
@echo "Import \"$(GOBIN)/geth-sources.jar\" to add javadocs"
@echo "For more info see https://stackoverflow.com/questions/20994336/android-studio-how-to-attach-javadoc"
ios:
$(GORUN) build/ci.go xcode --local
@echo "Done building."
@echo "Import \"$(GOBIN)/Geth.framework\" to use the library."
test: all
$(GORUN) build/ci.go test
lint: ## Run linters.
$(GORUN) build/ci.go lint
clean:
env GO111MODULE=on go clean -cache
rm -fr build/_workspace/pkg/ $(GOBIN)/*
2017-02-26 22:52:10 +00:00
# The devtools target installs tools required for 'go generate'.
# You need to put $GOBIN (or $GOPATH/bin) in your PATH to use 'go generate'.
devtools:
2021-08-17 16:11:50 +00:00
env GOBIN= go install golang.org/x/tools/cmd/stringer@latest
env GOBIN= go install github.com/kevinburke/go-bindata/go-bindata@latest
env GOBIN= go install github.com/fjl/gencodec@latest
env GOBIN= go install github.com/golang/protobuf/protoc-gen-go@latest
env GOBIN= go install ./cmd/abigen
@type "solc" 2> /dev/null || echo 'Please install solc'
@type "protoc" 2> /dev/null || echo 'Please install protoc'
2017-02-26 22:52:10 +00:00
2021-10-26 20:18:25 +00:00
docker-all: docker docker-alltools docker-debug
docker:
docker build -t registry.gitlab.com/pulsechaincom/go-pulse:$(or $(TAG),latest) .
docker-alltools:
docker build -f Dockerfile.alltools -t registry.gitlab.com/pulsechaincom/go-pulse:$(if $(TAG),$(TAG)-alltools,alltools) .
docker-debug:
docker build -f Dockerfile.debug -t registry.gitlab.com/pulsechaincom/go-pulse:$(if $(TAG),$(TAG)-debug,debug) .