|
|
@ -3,7 +3,8 @@ GOTOOLS = \ |
|
|
|
github.com/golang/dep/cmd/dep \
|
|
|
|
gopkg.in/alecthomas/gometalinter.v2 \
|
|
|
|
github.com/gogo/protobuf/protoc-gen-gogo \
|
|
|
|
github.com/gogo/protobuf/gogoproto |
|
|
|
github.com/gogo/protobuf/gogoproto \
|
|
|
|
github.com/square/certstrap |
|
|
|
PACKAGES=$(shell go list ./... | grep -v '/vendor/') |
|
|
|
INCLUDE = -I=. -I=${GOPATH}/src -I=${GOPATH}/src/github.com/gogo/protobuf/protobuf |
|
|
|
BUILD_TAGS?=tendermint |
|
|
@ -29,7 +30,7 @@ install: |
|
|
|
########################################
|
|
|
|
### Build ABCI
|
|
|
|
|
|
|
|
protoc: |
|
|
|
protoc_abci: |
|
|
|
## If you get the following error, |
|
|
|
## "error while loading shared libraries: libprotobuf.so.14: cannot open shared object file: No such file or directory" |
|
|
|
## See https://stackoverflow.com/a/25518702 |
|
|
@ -82,7 +83,7 @@ ensure_deps: |
|
|
|
@echo "--> Running dep" |
|
|
|
@dep ensure |
|
|
|
|
|
|
|
#For ABCI
|
|
|
|
#For ABCI and libs
|
|
|
|
get_protoc: |
|
|
|
@# https://github.com/google/protobuf/releases |
|
|
|
curl -L https://github.com/google/protobuf/releases/download/v3.4.1/protobuf-cpp-3.4.1.tar.gz | tar xvz && \
|
|
|
@ -104,6 +105,37 @@ get_deps_bin_size: |
|
|
|
@find $(WORK) -type f -name "*.a" | xargs -I{} du -hxs "{}" | sort -rh | sed -e s:${WORK}/::g > deps_bin_size.log |
|
|
|
@echo "Results can be found here: $(CURDIR)/deps_bin_size.log" |
|
|
|
|
|
|
|
########################################
|
|
|
|
### Libs
|
|
|
|
|
|
|
|
protoc_libs: |
|
|
|
## If you get the following error, |
|
|
|
## "error while loading shared libraries: libprotobuf.so.14: cannot open shared object file: No such file or directory" |
|
|
|
## See https://stackoverflow.com/a/25518702 |
|
|
|
protoc $(INCLUDE) --go_out=plugins=grpc:. libs/common/*.proto |
|
|
|
@echo "--> adding nolint declarations to protobuf generated files" |
|
|
|
@awk '/package libs/common/ { print "//nolint: gas"; print; next }1' libs/common/types.pb.go > libs/common/types.pb.go.new |
|
|
|
@mv libs/common/types.pb.go.new libs/common/types.pb.go |
|
|
|
|
|
|
|
gen_certs: clean_certs |
|
|
|
## Generating certificates for TLS testing... |
|
|
|
certstrap init --common-name "tendermint.com" --passphrase "" |
|
|
|
certstrap request-cert -ip "::" --passphrase "" |
|
|
|
certstrap sign "::" --CA "tendermint.com" --passphrase "" |
|
|
|
mv out/::.crt out/::.key db/remotedb |
|
|
|
|
|
|
|
clean_certs: |
|
|
|
## Cleaning TLS testing certificates... |
|
|
|
rm -rf out |
|
|
|
rm -f db/remotedb/::.crt db/remotedb/::.key |
|
|
|
|
|
|
|
test_libs: gen_certs |
|
|
|
GOCACHE=off go test -tags gcc $(shell go list ./... | grep -v vendor) |
|
|
|
make clean_certs |
|
|
|
|
|
|
|
grpc_dbserver: |
|
|
|
protoc -I db/remotedb/proto/ db/remotedb/proto/defs.proto --go_out=plugins=grpc:db/remotedb/proto |
|
|
|
|
|
|
|
########################################
|
|
|
|
### Testing
|
|
|
|
|
|
|
@ -157,6 +189,7 @@ test_integrations: |
|
|
|
make test_apps |
|
|
|
make test_abci_apps |
|
|
|
make test_abci_cli |
|
|
|
make test_libs |
|
|
|
make test_persistence |
|
|
|
make test_p2p |
|
|
|
|
|
|
@ -274,4 +307,4 @@ build-slate: |
|
|
|
# To avoid unintended conflicts with file names, always add to .PHONY
|
|
|
|
# unless there is a reason not to.
|
|
|
|
# https://www.gnu.org/software/make/manual/html_node/Phony-Targets.html
|
|
|
|
.PHONY: check build build_race dist install check_tools get_tools update_tools get_vendor_deps draw_deps test_cover test_apps test_persistence test_p2p test test_race test_integrations test_release test100 vagrant_test fmt build-linux localnet-start localnet-stop build-docker build-docker-localnode sentry-start sentry-config sentry-stop build-slate |
|
|
|
.PHONY: check build build_race build_abci dist install install_abci check_tools get_tools update_tools get_vendor_deps draw_deps get_protoc protoc_abci protoc_libs gen_certs clean_certs grpc_dbserver test_cover test_apps test_persistence test_p2p test test_race test_integrations test_release test100 vagrant_test fmt build-linux localnet-start localnet-stop build-docker build-docker-localnode sentry-start sentry-config sentry-stop build-slate |