From 4f72645a8a5ee0e8e93cb089dc2a81d4fd7a01ea Mon Sep 17 00:00:00 2001 From: Oliver Gugger Date: Tue, 27 Sep 2022 22:09:30 +0200 Subject: [PATCH] make: add install and release-install goals To simplify building the release-grade (stripped and reproducible) binaries from source, we add the install and release-install make goals. Running either of the commands will create binaries in the $GOPATH/bin directories. The main difference between the two goals is that the release-install will not contain any local paths and no debug information. --- Makefile | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Makefile b/Makefile index 3f228a3d33..5bfb1aa6a5 100644 --- a/Makefile +++ b/Makefile @@ -71,6 +71,19 @@ build: $(GOBUILD) $(PKG)/cmd/findcheckpoint $(GOBUILD) $(PKG)/cmd/addblock +install: + @$(call print, "Installing all binaries") + $(GOINSTALL) $(PKG) + $(GOINSTALL) $(PKG)/cmd/btcctl + $(GOINSTALL) $(PKG)/cmd/gencerts + $(GOINSTALL) $(PKG)/cmd/findcheckpoint + $(GOINSTALL) $(PKG)/cmd/addblock + +release-install: + @$(call print, "Installing btcd and btcctl release binaries") + env CGO_ENABLED=0 $(GOINSTALL) -trimpath -ldflags="-s -w -buildid=" $(PKG) + env CGO_ENABLED=0 $(GOINSTALL) -trimpath -ldflags="-s -w -buildid=" $(PKG)/cmd/btcctl + # ======= # TESTING # =======