Reduce the number of targets and make the buildsystem more
flexible by parsing the TENDERMINT_BUILD_OPTIONS command
line variable (a-la Debian, inspired by dpkg-buildpackage's
DEB_BUILD_OPTIONS), e.g:
$ make install TENDERMINT_BUILD_OPTIONS='cleveldb'
replaces the old:
$ make install_c
Options can be mix&match'd, e.g.:
$ make install TENDERMINT_BUILD_OPTIONS='cleveldb race nostrip'
Three options are available:
- nostrip: don't strip debugging symbols nor DWARF tables.
- cleveldb: use cleveldb as db backend instead of goleveldb;
it switches on the CGO_ENABLED Go environment variale.
- race: pass -race to go build and enable data race detection.
This changeset is a port of gaia pull request: cosmos/gaia#363.
* Add cleveldb build for Amazon Linux
In attempting to build Tendermint binaries with cleveldb support that we
can use for load testing (see https://github.com/interchainio/got), it
became apparent that we need a bit of a simpler build process for this
kind of executable. Since we're basing our load testing infrastructure
on Amazon Linux, it makes sense to support such a build process for
Amazon Linux in a platform-independent way.
This PR allows one to simply build the Amazon Linux-compatible binary
using Docker on one's local machine. It first builds an Amazon
Linux-based build image with Go v1.12.9, and then it uses that image to
build the cleveldb version of Tendermint.
This should, in theory, be compatible with CentOS too, but that's yet to
be tested.
* Add comment describing the new Makefile target
* Add missing PHONY entry for new Makefile target
* Expand on Makefile comment