2020-12-06 10:21:43 -08:00
|
|
|
# Makefile for production builds. This is not meant, or optimized, for incremental or debug builds. Use the devnet for
|
|
|
|
# development. For the sake of decentralization, we specifically avoid the use of prebuilt containers wherever possible
|
|
|
|
# to increase diversity - operators sourcing their compiler binaries from different sources is a good thing.
|
|
|
|
|
|
|
|
SHELL = /usr/bin/env bash
|
|
|
|
MAKEFLAGS += --no-builtin-rules
|
|
|
|
|
|
|
|
PREFIX ?= /usr/local
|
|
|
|
OUT = build
|
|
|
|
BIN = $(OUT)/bin
|
|
|
|
|
2021-01-28 12:46:09 -08:00
|
|
|
VERSION = $(shell git describe --tags --dirty)
|
|
|
|
|
2020-12-06 10:21:43 -08:00
|
|
|
.PHONY: dirs
|
|
|
|
dirs: Makefile
|
|
|
|
@mkdir -p $(BIN)
|
|
|
|
|
|
|
|
.PHONY: install
|
2020-12-06 10:25:24 -08:00
|
|
|
install:
|
|
|
|
install -m 775 $(BIN)/* $(PREFIX)/bin
|
|
|
|
setcap cap_ipc_lock=+ep $(PREFIX)/bin/guardiand
|
2020-12-06 10:21:43 -08:00
|
|
|
|
|
|
|
.PHONY: generate
|
|
|
|
generate: dirs
|
|
|
|
./generate-protos.sh
|
|
|
|
|
|
|
|
.PHONY: bridge
|
|
|
|
bridge: $(BIN)/guardiand
|
|
|
|
|
|
|
|
.PHONY: $(BIN)/guardiand
|
2020-12-07 09:02:41 -08:00
|
|
|
$(BIN)/guardiand: dirs generate
|
2021-01-28 12:46:09 -08:00
|
|
|
cd bridge && go build -ldflags "-X github.com/certusone/wormhole/bridge/pkg/version.version=${VERSION}" \
|
|
|
|
-mod=readonly -o ../$(BIN)/guardiand \
|
|
|
|
github.com/certusone/wormhole/bridge
|