diff --git a/bindings/ocaml/Makefile.ocaml b/bindings/ocaml/Makefile.ocaml index fb03b1a3e24..fa03c63f326 100644 --- a/bindings/ocaml/Makefile.ocaml +++ b/bindings/ocaml/Makefile.ocaml @@ -38,8 +38,9 @@ endif # Tools OCAMLCFLAGS += -I $(OcamlDir) -I $(ObjDir) OCAMLAFLAGS += $(patsubst %,-cclib %, \ - $(filter-out -L$(LibDir),$(shell $(LLVM_CONFIG) --ldflags)) \ - $(UsedLibs) -l$(LIBRARYNAME)) + $(filter-out -L$(LibDir),-l$(LIBRARYNAME) \ + $(shell $(LLVM_CONFIG) --ldflags)) \ + $(UsedLibs)) Compile.CMI := $(strip $(OCAMLC) -c $(OCAMLCFLAGS) -o) Compile.CMO := $(strip $(OCAMLC) -c $(OCAMLCFLAGS) -o)