From: Stephane Glondu <steph@glondu.net>
Date: Sat, 31 Aug 2019 15:28:34 +0200
Subject: Do not use -custom and fix dynamic loading of stubs

---
 Makefile | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 75dc84a..25bd48a 100644
--- a/Makefile
+++ b/Makefile
@@ -1,3 +1,5 @@
+export CAML_LD_LIBRARY_PATH := $(CURDIR)
+
 PREFIX := /usr/local
 OCAMLFIND := ocamlfind
 INSTALL := install
@@ -117,7 +119,7 @@ OCAMLLIBFLAGS := -cclib "-L. -lpyml_stubs"
 OCAMLLIBNUMPYFLAGS := -cclib "-L. -lnumpy_stubs"
 
 OCAMLLIBFLAGSNATIVE := $(OCAMLLIBFLAGS)
-OCAMLLIBFLAGSBYTECODE := -custom $(OCAMLLIBFLAGS)
+OCAMLLIBFLAGSBYTECODE := $(OCAMLLIBFLAGS)
 
 UNAME_ARCH := $(shell uname)
 
