[OCaml] PR19859: Add Llvm.{fcmp_predicate,float_of_const}.
[oota-llvm.git] / bindings / ocaml / Makefile.ocaml
index 1e9eb9f5600ddbabd951d43cc40bc5fe2c9517cc..7b26caf6bb633bb5cf97476593ba1f34434508e3 100644 (file)
@@ -1,20 +1,20 @@
 ##===- bindings/ocaml/Makefile.ocaml -----------------------*- Makefile -*-===##
-# 
+#
 #                     The LLVM Compiler Infrastructure
 #
 # This file is distributed under the University of Illinois Open Source
 # License. See LICENSE.TXT for details.
-# 
+#
 ##===----------------------------------------------------------------------===##
-# 
+#
 # An OCaml library is a unique project type in the context of LLVM, so rules are
 # here rather than in Makefile.rules.
-# 
+#
 # Reference materials on installing OCaml libraries:
-# 
+#
 #   https://fedoraproject.org/wiki/Packaging/OCaml
 #   http://pkg-ocaml-maint.alioth.debian.org/ocaml_packaging_policy.txt
-# 
+#
 ##===----------------------------------------------------------------------===##
 
 include $(LEVEL)/Makefile.config
@@ -37,7 +37,7 @@ OcamlDir := $(LibDir)/ocaml
 # Info from llvm-config and similar
 ifndef IS_CLEANING_TARGET
 ifdef UsedComponents
-UsedLibs = $(shell $(LLVM_CONFIG) --libs $(UsedComponents))
+UsedLibs = $(shell $(LLVM_CONFIG) --libs --system-libs $(UsedComponents))
 UsedLibNames = $(shell $(LLVM_CONFIG) --libnames $(UsedComponents))
 endif
 endif
@@ -68,11 +68,10 @@ OCAMLAFLAGS += $(patsubst %,-cclib %, \
                                           $(UsedLibs))
 endif
 endif
-# -g was introduced in 3.10.0.
-#ifneq ($(ENABLE_OPTIMIZED),1)
-#  OCAMLDEBUGFLAG := -g
-#endif
+
+ifneq ($(ENABLE_OPTIMIZED),1)
+  OCAMLDEBUGFLAG := -g
+endif
 
 Compile.CMI  := $(strip $(OCAMLC) -c $(OCAMLCFLAGS) $(OCAMLDEBUGFLAG) -o)
 Compile.CMO  := $(strip $(OCAMLC) -c $(OCAMLCFLAGS) $(OCAMLDEBUGFLAG) -o)
@@ -98,7 +97,7 @@ endif
 ifdef OCAMLSTUBS
 Archive.CMXA := $(strip $(OCAMLOPT) -a $(patsubst %,-cclib %, \
                                     $(LLVMLibsOptions) -l$(LIBRARYNAME) \
-                                    -L$(SharedLibDir) $(OCAMLRPATH))
+                                    -L$(SharedLibDir) $(OCAMLRPATH)) \
                                     $(OCAMLDEBUGFLAG) -o)
 else
 Archive.CMXA := $(strip $(OCAMLOPT) -a $(OCAMLAFLAGS) $(OCAMLDEBUGFLAG) -o)
@@ -225,7 +224,7 @@ install-a:: $(LibraryA)
        $(Echo) "Installing $(BuildMode) $(DestA)"
        $(Verb) $(MKDIR) $(PROJ_libocamldir)
        $(Verb) $(INSTALL) $(LibraryA) $(DestA)
-       $(Verb) 
+       $(Verb)
 
 uninstall-a::
        $(Echo) "Uninstalling $(DestA)"