Source

chart / OMakefile

Full commit
# How-to-build using OMake
#
# yes no | omake --install # to create OMakeroot for the first time

# If OMakeroot is here, include OMyMakefile
if $(file-exists OMakeroot)
   include OMyMakefile
   export

NATIVE_ENABLED = false

OCAMLDEPFLAGS= -syntax camlp4o -package lwt,js_of_ocaml.syntax
OCAMLPPFLAGS= -syntax camlp4o -package lwt,js_of_ocaml.syntax

MyOCamlJSProgram(name, files) =
    NATIVE_ENABLED = false

    OCAML_PREINSTALLED_PACKS[] +=
    OCAMLPACKS[] += lwt js_of_ocaml

    public.OCAML_BYTE_LINK_FLAGS = -linkpkg # removes -custom

    NO_INSTALL=true
    MyOCamlProgram($(name), $(files))

    $(name).js: $(name).run
        js_of_ocaml $<

    .DEFAULT: $(name).js

    export # Need to export the rules for lwt and others

Subdirs()