Compiling with OMake

Here is the summary on how to compile an OCaml program with
OMake. It produces a native code
executable or a bytecode executable if ocamlopt is not available, using
ocamllex, ocamlyacc and regular ocaml files that use camlp4 syntax
libraries as well as regular libraries, all managed by
findlib/ocamlfind:

Do omake --install: it creates a template OMakefile and OMakeroot
in the current directory. The OMakeroot file is left unchanged. The
OMakefile template doesn't show options for using ocamlfind, so we
will basically rewrite it, and grab some of the additional options
that are shown in the file.

Our source files are parser.mly, lexer.mll and main.ml. Delete
or comment out the content of the automatically generated OMakefile,
and put the following:

Adapt your OMakefile to suit your needs in terms of source files, result
files, libraries and options. Now you can run omake, it should compile
an executable named either myprog.run (bytecode) or myprog.opt (native
code), or whatever you chose to call it. The omake clean command removes
files that were produced by the compilation.