Remove libtool.
[oota-llvm.git] / bindings / ocaml / Makefile.ocaml
index 55a052af7e0123313b647646e8b3843abdd7d863..9ca9fb742a9dc3ce2e032e7f8ccbd545f70df6b4 100644 (file)
@@ -38,10 +38,16 @@ endif
 
 # Tools
 OCAMLCFLAGS += -I $(OcamlDir) -I $(ObjDir)
+ifneq ($(ObjectsO),)
 OCAMLAFLAGS += $(patsubst %,-cclib %, \
                  $(filter-out -L$(LibDir),-l$(LIBRARYNAME) \
                                           $(shell $(LLVM_CONFIG) --ldflags)) \
                                           $(UsedLibs))
+else
+OCAMLAFLAGS += $(patsubst %,-cclib %, \
+                 $(filter-out -L$(LibDir),$(shell $(LLVM_CONFIG) --ldflags)) \
+                                          $(UsedLibs))
+endif
  
 # -g was introduced in 3.10.0.
 #ifneq ($(ENABLE_OPTIMIZED),1)
@@ -107,6 +113,7 @@ $(ObjectsCMI): $(UsedOcamlInterfaces:%=$(OcamlDir)/%.cmi)
 
 ##===- Build static library from C sources --------------------------------===##
 
+ifneq ($(ObjectsO),)
 all-local:: $(LibraryA)
 clean-local:: clean-a
 install-local:: install-a
@@ -124,12 +131,13 @@ clean-a::
 install-a:: $(LibraryA)
        $(Echo) "Installing $(BuildMode) $(DestA)"
        $(Verb) $(MKDIR) $(PROJ_libocamldir)
-       $(Verb) $(LTInstall) $(LibraryA) $(DestA)
+       $(Verb) $(INSTALL) $(LibraryA) $(DestA)
        $(Verb) 
 
 uninstall-a::
        $(Echo) "Uninstalling $(DestA)"
        -$(Verb) $(RM) -f $(DestA)
+endif
 
 
 ##===- Deposit dependent libraries adjacent to Ocaml libs -----------------===##