makefile: add options for other DBs (#5357)

## Description

This PR adds support for badgerdb, rocksdb and boltdb within the build options. 

RocksDB builds correctly.

```
 make build TENDERMINT_BUILD_OPTIONS=rocksdb    
CGO_ENABLED=1 go build -mod=readonly -ldflags "-X github.com/tendermint/tendermint/version.GitCommit=`git rev-parse --short=8 HEAD` -s -w " -trimpath -tags 'tendermint rocksdb' -o build/tendermint ./cmd/tendermint/

tendermint on  master [$!] via 🐹 v1.15.2 took 19s 
```

Closes: #5355
This commit is contained in:
Marko
2020-09-15 10:27:14 +02:00
committed by GitHub
parent 8aac1d1333
commit cbe72db7be

View File

@@ -26,6 +26,22 @@ ifeq (cleveldb,$(findstring cleveldb,$(TENDERMINT_BUILD_OPTIONS)))
BUILD_TAGS += cleveldb
endif
# handle badgerdb
ifeq (badgerdb,$(findstring badgerdb,$(TENDERMINT_BUILD_OPTIONS)))
BUILD_TAGS += badgerdb
endif
# handle rocksdb
ifeq (rocksdb,$(findstring rocksdb,$(TENDERMINT_BUILD_OPTIONS)))
CGO_ENABLED=1
BUILD_TAGS += rocksdb
endif
# handle boltdb
ifeq (boltdb,$(findstring boltdb,$(TENDERMINT_BUILD_OPTIONS)))
BUILD_TAGS += boltdb
endif
# allow users to pass additional flags via the conventional LDFLAGS variable
LD_FLAGS += $(LDFLAGS)