From 8a27f51b768a4220b812a1cefaddc08f9e7549ff Mon Sep 17 00:00:00 2001 From: Yongwoo Lee Date: Thu, 13 May 2021 11:52:35 +0900 Subject: [PATCH] fix: select goleveldb when options libsecp256k1 only When LBM_BUILD_OPTIONS has no DB options and only has libsecp256k1, goleveldb will be selected by default. The previous commit has a bug for that. --- Makefile | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index e8da213dd3..3db2c17af7 100644 --- a/Makefile +++ b/Makefile @@ -41,8 +41,8 @@ ifeq ($(LEDGER_ENABLED),true) endif endif -# DB backend and secp256k1 implementation selection -ifeq (,$(filter $(LBM_BUILD_OPTIONS), cleveldb rocksdb boltdb badgerdb libsecp256k1)) +# DB backend selection +ifeq (,$(filter $(LBM_BUILD_OPTIONS), cleveldb rocksdb boltdb badgerdb)) BUILD_TAGS += goleveldb DB_BACKEND = goleveldb else @@ -64,10 +64,12 @@ else BUILD_TAGS += boltdb DB_BACKEND = boltdb endif - ifeq (libsecp256k1,$(findstring libsecp256k1,$(LBM_BUILD_OPTIONS))) - CGO_ENABLED=1 - BUILD_TAGS += libsecp256k1 - endif +endif + +# secp256k1 implementation selection +ifeq (libsecp256k1,$(findstring libsecp256k1,$(LBM_BUILD_OPTIONS))) + CGO_ENABLED=1 + BUILD_TAGS += libsecp256k1 endif build_tags += $(BUILD_TAGS)