Commits

Anonymous committed f5b33c1

auto update of OMyMakefile

  • Participants
  • Parent commits 66de18f

Comments (0)

Files changed (1)

 # OCaml 
 # ========================================================================
 
+#| OCAMLANY is either byte or native
+OCAMLANY =
+    if $(OCAMLC_EXISTS)
+        value $(OCAMLC)
+    else 
+        value $(OCAMLOPT)
+
 #|Path to the OCaml library directory
-OCAML_WHERE = $(shell ocamlc -where)
+OCAML_WHERE = $(shell $(OCAMLANY) -where)
 
 #|Version without extensions
-OCAML_VERSION = $(shell ocamlc -version | sed -e 's/^\([0-9.]*\).*/\1/')
+OCAML_VERSION = $(shell $(OCAMLANY) -version | sed -e 's/^\([0-9.]*\).*/\1/')
 
 #|OMy requires OCamlFind!
 USE_OCAMLFIND = true
     return $(shell ocamlfind query $(name))
 
 #|Set NATIVE_ENABLED false locally if a project does not requre opt compilation.
-NATIVE_ENABLED = $(OCAMLOPT_EXISTS)
 NATIVE_SHARED_ENABLED = $(OCAMLOPT_EXISTS)
+
+#|BYTE_ENABLED = true by default
 BYTE_ENABLED = true
 
 #|The default warning and errors. If you want to use different warning and error switches, use redefine the variable.
 OCAMLFLAGS = -g 
 
 #|Warnings not to be printed separted with space
-OCAMLWARNING_IGNORE[] = 4 9 40 42 44 45
+OCAMLWARNING_IGNORE[] = 3 4 9 40 42 44 45
 
 #|Warnings treated as non errors
 OCAMLWARNING_NON_ERROR[] = 4 9 40 42 44 45
 
 #|If it is false, warnings do not stop the compilation even if they are listed in OCAMLWARNING_NON_ERROR
-#If you are in developing something, turn it to true!
+#If you are in developing something, override it to true!
 OCAMLWARNING_STOP_AT_ERROR_WARNING=false
 
 #|The maximum warning value.
 # This is the maximum warning ID NOT of the current OCaml compiler,
-#                                BUT of the OCaml compiler used by the author.
+#                                BUT of the OCaml compiler used by the author of OMyMakefile.
 OCAMLWARNING_MAX= 45
 
 #|Function to build warning switches
 #|Additional implicit rules by file extensions
 # annot, cmt, cmti files
 %.annot %.cmt: %.ml %.cmi
-	$(OCamlC) -c -annot $(OCAMLANNOTFLAGS) $<
+	$(OCamlC) -c $<
 
 %.cmti: %.mli 
-	$(OCamlC) -c $(OCAMLANNOTFLAGS) $<
+	$(OCamlC) -c $<
 
-#|Define OCAML_ANNOT so that ocamlc/ocamlopt automatically create annot/cmt/cmti files, even without -annot/-bin-annot option. This requires a special compiler patch 
-setenv(OCAML_ANNOT, 1)
+#| We recommend to have OCAMLPARAM=_,g=1,annot=1,bin-annot=1,short-paths=1
 
 #|Enable the backtrace
 setenv(OCAMLRUNPARAM, b)