diff --git a/Makefile b/Makefile index ef9910f956a..cff7c483285 100755 --- a/Makefile +++ b/Makefile @@ -350,6 +350,8 @@ release/%/bin/orderer: $(PROJECT_FILES) mkdir -p $(@D) $(CGO_FLAGS) GOOS=$(GOOS) GOARCH=$(GOARCH) go build -o $(abspath $@) -tags "$(GO_TAGS)" -ldflags "$(GO_LDFLAGS)" $(pkgmap.$(@F)) +release/%/bin/peer: GO_LDFLAGS = $(patsubst %,-X $(PKGNAME)/common/metadata.%,$(METADATA_VAR)) + release/%/bin/peer: $(PROJECT_FILES) @echo "Building $@ for $(GOOS)-$(GOARCH)" mkdir -p $(@D)