From 72e8641c8dd3f216707a3dffeba1f1dcbacab2f9 Mon Sep 17 00:00:00 2001 From: Robert Pirtle Date: Mon, 8 Apr 2024 17:00:07 -0700 Subject: [PATCH] build: inject brew deps for MacOS rocksdb build (#1812) * build: inject brew deps for MacOS rocksdb build * configure make build-rocksdb-brew --- Makefile | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Makefile b/Makefile index ff8effb9..d44d1ea9 100644 --- a/Makefile +++ b/Makefile @@ -196,6 +196,14 @@ endif build-linux: go.sum LEDGER_ENABLED=false GOOS=linux GOARCH=amd64 $(MAKE) build +# build on rocksdb-backed kava on macOS with shared libs from brew +# this assumes you are on macOS & these deps have been installed with brew: +# rocksdb, snappy, lz4, and zstd +# use like `make build-rocksdb-brew COSMOS_BUILD_OPTIONS=rocksdb` +build-rocksdb-brew: + export CGO_CFLAGS := -I$(shell brew --prefix rocksdb)/include + export CGO_LDFLAGS := -L$(shell brew --prefix rocksdb)/lib -lrocksdb -lstdc++ -lm -lz -L$(shell brew --prefix snappy)/lib -L$(shell brew --prefix lz4)/lib -L$(shell brew --prefix zstd)/lib + install: go.sum $(GO_BIN) install -mod=readonly $(BUILD_FLAGS) ./cmd/kava