Skip to content

Commit

Permalink
Merge branch 'nguyen/test-relayer' of https://github.com/notional-lab…
Browse files Browse the repository at this point in the history
…s/cosmos-relayer into nguyen/test-relayer
  • Loading branch information
expertdicer committed Jul 31, 2023
2 parents 3fef4f5 + c07be98 commit 6e45256
Showing 1 changed file with 39 additions and 1 deletion.
40 changes: 39 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,48 @@ all: lint install
###############################################################################
# Build / Install
###############################################################################
LEDGER_ENABLED ?= true
build_tags = netgo
ifeq ($(LEDGER_ENABLED),true)
ifeq ($(OS),Windows_NT)
GCCEXE = $(shell where gcc.exe 2> NUL)
ifeq ($(GCCEXE),)
$(error gcc.exe not installed for ledger support, please install or set LEDGER_ENABLED=false)
else
build_tags += ledger
endif
else
UNAME_S = $(shell uname -s)
ifeq ($(UNAME_S),OpenBSD)
$(warning OpenBSD detected, disabling ledger support (https://github.com/cosmos/cosmos-sdk/issues/1988))
else
GCC = $(shell command -v gcc 2> /dev/null)
ifeq ($(GCC),)
$(error gcc not installed for ledger support, please install or set LEDGER_ENABLED=false)
else
build_tags += ledger
endif
endif
endif
endif

ifeq (cleveldb,$(findstring cleveldb,$(COSMOS_BUILD_OPTIONS)))
build_tags += gcc cleveldb
endif
build_tags += $(BUILD_TAGS)
build_tags := $(strip $(build_tags))

whitespace :=
whitespace += $(whitespace)
comma := ,

build_tags_comma_sep := $(subst $(whitespace),$(comma),$(build_tags))

ldflags = -X github.com/cosmos/relayer/v2/cmd.Version=$(VERSION) \
-X github.com/cosmos/relayer/v2/cmd.Commit=$(COMMIT) \
-X github.com/cosmos/relayer/v2/cmd.Dirty=$(DIRTY)
-X github.com/cosmos/relayer/v2/cmd.Dirty=$(DIRTY) \
-X "github.com/cosmos/cosmos-sdk/version.BuildTags=$(build_tags_comma_sep)"


ldflags += $(LDFLAGS)
ldflags := $(strip $(ldflags))
Expand Down

0 comments on commit 6e45256

Please sign in to comment.