From 932e480db9c75cc65a83ad4fd03c4f54d7b4a5a5 Mon Sep 17 00:00:00 2001
From: Nehal J Wani <nehaljw.kkd1@gmail.com>
Date: Sat, 30 Jun 2018 11:25:46 -0500
Subject: [PATCH 9/9] Add ${MKLDNNROOT}/lib to RPATH

---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 8fba3ea..13eec3e 100644
--- a/Makefile
+++ b/Makefile
@@ -123,7 +123,7 @@ ifeq ($(USE_MKLDNN), 1)
 		LDFLAGS += -L$(MKLROOT)/lib
 	endif
 	CFLAGS += -I$(MKLDNNROOT)/include
-	LDFLAGS += -L$(MKLDNNROOT)/lib -lmkldnn -Wl,-rpath,'$${ORIGIN}'
+	LDFLAGS += -L$(MKLDNNROOT)/lib -lmkldnn -Wl,-rpath,'$${ORIGIN}' -Wl,-rpath,$(MKLDNNROOT)/lib
 endif
 
 # setup opencv
-- 
2.17.0

