Browse Source

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
pull/5358/head
Marko 4 years ago
committed by GitHub
parent
commit
cbe72db7be
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 16 additions and 0 deletions
  1. +16
    -0
      Makefile

+ 16
- 0
Makefile View File

@ -26,6 +26,22 @@ ifeq (cleveldb,$(findstring cleveldb,$(TENDERMINT_BUILD_OPTIONS)))
BUILD_TAGS += cleveldb BUILD_TAGS += cleveldb
endif 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 # allow users to pass additional flags via the conventional LDFLAGS variable
LD_FLAGS += $(LDFLAGS) LD_FLAGS += $(LDFLAGS)


Loading…
Cancel
Save