projects
/
oota-llvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[OCaml] Allow out-of-tree builds of LLVM bindings.
[oota-llvm.git]
/
bindings
/
ocaml
/
Makefile.ocaml
diff --git
a/bindings/ocaml/Makefile.ocaml
b/bindings/ocaml/Makefile.ocaml
index 943061e65e6670af3c01d939601ac4b3ba19b176..1f65a7b8f905f6900f8301d90e5cf7cf6feb8bf3 100644
(file)
--- a/
bindings/ocaml/Makefile.ocaml
+++ b/
bindings/ocaml/Makefile.ocaml
@@
-32,6
+32,12
@@
endif
include $(LEVEL)/Makefile.common
include $(LEVEL)/Makefile.common
+# Used in out-of-tree builds of OCaml bindings only.
+ifdef SYSTEM_LLVM_CONFIG
+LLVM_CONFIG = $(SYSTEM_LLVM_CONFIG)
+LLVMLibsOptions += $(shell $(LLVM_CONFIG) --ldflags)
+endif
+
# Intentionally ignore PROJ_prefix here. We want the ocaml stdlib. However, the
# user can override this with OCAML_LIBDIR or configure --with-ocaml-libdir=.
PROJ_libocamldir := $(DESTDIR)$(OCAML_LIBDIR)
# Intentionally ignore PROJ_prefix here. We want the ocaml stdlib. However, the
# user can override this with OCAML_LIBDIR or configure --with-ocaml-libdir=.
PROJ_libocamldir := $(DESTDIR)$(OCAML_LIBDIR)
@@
-261,8
+267,9
@@
uninstall-shared::
endif
endif
-##===- Deposit dependent libraries adjacent to O
c
aml libs -----------------===##
+##===- Deposit dependent libraries adjacent to O
C
aml libs -----------------===##
+ifndef SYSTEM_LLVM_CONFIG
all-local:: build-deplibs
clean-local:: clean-deplibs
install-local:: install-deplibs
all-local:: build-deplibs
clean-local:: clean-deplibs
install-local:: install-deplibs
@@
-287,7
+294,7
@@
install-deplibs:
uninstall-deplibs:
$(Verb) $(RM) -f $(DestLibs)
uninstall-deplibs:
$(Verb) $(RM) -f $(DestLibs)
-
+endif
##===- Build ocaml interfaces (.mli's -> .cmi's) --------------------------===##
##===- Build ocaml interfaces (.mli's -> .cmi's) --------------------------===##