diff options
| author | Peter Zotov <whitequark@whitequark.org> | 2015-01-13 12:17:56 +0000 |
|---|---|---|
| committer | Peter Zotov <whitequark@whitequark.org> | 2015-01-13 12:17:56 +0000 |
| commit | 343991dd8bea92af1f20bcad9e24d3d5578a7cb5 (patch) | |
| tree | 3ca26eaf53405c1e21362085bf489dcebaa3a768 /llvm/bindings | |
| parent | 4a445c047f26e3e41dfabd4014c03807330a4c3e (diff) | |
| download | bcm5719-llvm-343991dd8bea92af1f20bcad9e24d3d5578a7cb5.tar.gz bcm5719-llvm-343991dd8bea92af1f20bcad9e24d3d5578a7cb5.zip | |
[OCaml] Allow out-of-tree builds of LLVM bindings.
In order to use this feature, configure LLVM as usual,
but then build and install it as:
make all install SYSTEM_LLVM_CONFIG=llvm-config
where llvm-config is the llvm-config binary installed on your
system (possibly llvm-config-VERSION on e.g. Debian).
llvm-svn: 225787
Diffstat (limited to 'llvm/bindings')
| -rw-r--r-- | llvm/bindings/ocaml/Makefile.ocaml | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/llvm/bindings/ocaml/Makefile.ocaml b/llvm/bindings/ocaml/Makefile.ocaml index 943061e65e6..1f65a7b8f90 100644 --- a/llvm/bindings/ocaml/Makefile.ocaml +++ b/llvm/bindings/ocaml/Makefile.ocaml @@ -32,6 +32,12 @@ endif 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) @@ -261,8 +267,9 @@ uninstall-shared:: endif -##===- Deposit dependent libraries adjacent to Ocaml libs -----------------===## +##===- Deposit dependent libraries adjacent to OCaml libs -----------------===## +ifndef SYSTEM_LLVM_CONFIG all-local:: build-deplibs clean-local:: clean-deplibs install-local:: install-deplibs @@ -287,7 +294,7 @@ install-deplibs: uninstall-deplibs: $(Verb) $(RM) -f $(DestLibs) - +endif ##===- Build ocaml interfaces (.mli's -> .cmi's) --------------------------===## |

