From 0a1ca182e628e2cc35b85158696fc89a3f337c32 Mon Sep 17 00:00:00 2001 From: Phil Story Date: Thu, 8 Apr 2021 22:25:50 -0600 Subject: [PATCH] Add rpath lookup for pwd libwasmvm (#240) --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 39aadc1eaf..24c9a0c2e3 100644 --- a/Makefile +++ b/Makefile @@ -5,9 +5,9 @@ PACKAGES := $(shell go list ./... 2>/dev/null || true) PACKAGES_NOSIMULATION := $(filter-out %/simulation%,$(PACKAGES)) PACKAGES_SIMULATION := $(filter %/simulation%,$(PACKAGES)) -LEVELDB_PATH := $(shell brew --prefix leveldb 2>/dev/null || echo "$(HOME)/Cellar/leveldb/1.22/include") -CGO_CFLAGS := -I$(LEVELDB_PATH)/include -CGO_LDFLAGS := -L$(LEVELDB_PATH)/lib +LEVELDB_PATH = $(shell brew --prefix leveldb 2>/dev/null || echo "$(HOME)/Cellar/leveldb/1.22/include") +CGO_CFLAGS = -I$(LEVELDB_PATH)/include +CGO_LDFLAGS = "-L$(LEVELDB_PATH)/lib -Wl,-rpath,\$$ORIGIN" BINDIR ?= $(GOPATH)/bin BUILDDIR ?= $(CURDIR)/build