diff --git a/Changes b/Changes index a7779b4b6..a61a45482 100644 --- a/Changes +++ b/Changes @@ -212,6 +212,8 @@ Features wishes: (Clark Gaebel) - GPR#165, GPR#221: fix windows compilation warnings (Bernhard Schommer, Gabriel Scherer, report by Alain Frisch) +- GPR#189: Added .dylib and .so as extensions for ocamlmklib + (Edgar Aroutiounian, Peter Zotov) OCaml 4.02.3 (27 Jul 2015): --------------------------- diff --git a/tools/ocamlmklib.ml b/tools/ocamlmklib.ml index 23a273ec1..a4cb69784 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 C library passed to ocamlc -a or ocamlopt -a only\ \n -ccopt C option passed to ocamlc -a or ocamlopt -a only\