Skip to content

Commit

Permalink
add gravity option in makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
thomas-nguy committed Nov 15, 2021
1 parent dbd1ba2 commit 0ea07e8
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ NETWORK ?= mainnet
COVERAGE ?= coverage.txt
BUILDDIR ?= $(CURDIR)/build
LEDGER_ENABLED ?= true
GRAVITY_ENABLED ?= true

ldflags = -X github.com/cosmos/cosmos-sdk/version.Name=cronos \
-X github.com/cosmos/cosmos-sdk/version.AppName=cronosd \
Expand Down Expand Up @@ -53,11 +54,15 @@ ifeq ($(LEDGER_ENABLED),true)
endif
endif

ifeq ($(GRAVITY_ENABLED),false)
BUILD_TAGS := $(BUILD_TAGS),nogravity
endif

all: build
build: check-network print-ledger go.sum
build: check-network print-ledger print-gravity go.sum
@go build -mod=readonly $(BUILD_FLAGS) $(BUILD_TAGS) -o $(BUILDDIR)/cronosd ./cmd/cronosd

install: check-network print-ledger go.sum
install: check-network print-ledger print-gravity go.sum
@go install -mod=readonly $(BUILD_FLAGS) $(BUILD_TAGS) ./cmd/cronosd

test:
Expand Down Expand Up @@ -240,6 +245,11 @@ ifeq ($(LEDGER_ENABLED),true)
@echo "building with ledger support"
endif

print-gravity:
ifeq ($(GRAVITY_ENABLED),true)
@echo "building with gravity"
endif

###############################################################################
### Protobuf ###
###############################################################################
Expand Down

0 comments on commit 0ea07e8

Please sign in to comment.