summaryrefslogtreecommitdiff
path: root/tools/ocamlmklib.ml
diff options
context:
space:
mode:
authorGabriel Scherer <gabriel.scherer@gmail.com>2015-08-22 21:54:14 +0000
committerGabriel Scherer <gabriel.scherer@gmail.com>2015-08-22 21:54:14 +0000
commita01ff5713024e42913bb82633b87a5081da13c11 (patch)
treee0e5092f110678015aa272ac3878157c8a2386c1 /tools/ocamlmklib.ml
parent92be080ced5ef422c78434d11b7c3a202540f850 (diff)
downloadocaml-a01ff5713024e42913bb82633b87a5081da13c11.tar.gz
Added .dylib and .so as extensions for ocamlmklib
(Edgar Aroutiounian, Peter Zotov) git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16373 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'tools/ocamlmklib.ml')
-rw-r--r--tools/ocamlmklib.ml8
1 files changed, 5 insertions, 3 deletions
diff --git a/tools/ocamlmklib.ml b/tools/ocamlmklib.ml
index 23a273ec12..a4cb697845 100644
--- a/tools/ocamlmklib.ml
+++ b/tools/ocamlmklib.ml
@@ -20,7 +20,7 @@ let compiler_path name =
let bytecode_objs = ref [] (* .cmo,.cma,.ml,.mli files to pass to ocamlc *)
and native_objs = ref [] (* .cmx,.cmxa,.ml,.mli files to pass to ocamlopt *)
-and c_objs = ref [] (* .o, .a, .obj, .lib, .dll files to pass
+and c_objs = ref [] (* .o, .a, .obj, .lib, .dll, .dylib, .so files to pass
to mksharedlib and ar *)
and caml_libs = ref [] (* -cclib to pass to ocamlc, ocamlopt *)
and caml_opts = ref [] (* -ccopt to pass to ocamlc, ocamlopt *)
@@ -75,7 +75,9 @@ let parse_arguments argv =
else if ends_with s ".ml" || ends_with s ".mli" then
(bytecode_objs := s :: !bytecode_objs;
native_objs := s :: !native_objs)
- else if List.exists (ends_with s) [".o"; ".a"; ".obj"; ".lib"; ".dll"] then
+ else if List.exists (ends_with s)
+ [".o"; ".a"; ".obj"; ".lib"; ".dll"; ".dylib"; ".so"]
+ then
c_objs := s :: !c_objs
else if s = "-cclib" then
caml_libs := next_arg () :: "-cclib" :: !caml_libs
@@ -153,7 +155,7 @@ let parse_arguments argv =
let usage = "\
Usage: ocamlmklib [options] <.cmo|.cma|.cmx|.cmxa|.ml|.mli|.o|.a|.obj|.lib|\
- .dll files>\
+ .dll|.dylib files>\
\nOptions are:\
\n -cclib <lib> C library passed to ocamlc -a or ocamlopt -a only\
\n -ccopt <opt> C option passed to ocamlc -a or ocamlopt -a only\