(rule
  (target gwdPluginMD5.ml)
  (deps
    (alias_rec %{project_root}/plugins/plugin)
    (:maker mk_gwdPluginMD5.ml)
  )
  (action (with-stdout-to %{target} (run ocaml %{maker} %{project_root}/plugins)))
)

(library
  (name gwd_lib)
  (public_name geneweb.gwd_lib)
  (wrapped true)
  (libraries
    geneweb
    wserver
    %%%GWDB_PKG%%%
    %%%SOSA_PKG%%%
    %%%SYSLOG_PKG%%%
  )
  (preprocess (action (run %{bin:cppo} %%%CPPO_D%%% %{input-file})))
  (modules gwdLog gwdPlugin request)
)

(executable
  (name gwd)
  (public_name geneweb.gwd)
  (flags -linkall)
  (libraries
    dynlink
    geneweb
    gwd_lib
    str
    unix
    wserver
    %%%GWDB_PKG%%%
    %%%SOSA_PKG%%%
  )
  (preprocess (action (run %{bin:cppo} %%%CPPO_D%%% %{input-file})))
  (modules
    base64
    gwd
    gwdPluginDep
    gwdPluginMD5
    gwdPluginMETA
    robot
  )
)
