(library
  (name            opam_stubs)
  (public_name     opam-core.stubs)
  (synopsis        "OCaml Package Manager C stubs")
  (libraries       unix)
  (flags           (:standard
                   (:include ../ocaml-flags-standard.sexp)
                   (:include ../ocaml-context-flags.sexp)))
  (c_names         opamInject opamWindows)
  (c_flags         (:standard
                   (:include c-flags.sexp)))
  (c_library_flags (:standard
                   (:include c-libraries.sexp)))
  (wrapped         false))

(rule
  (with-stdout-to c-flags.sexp (run ocaml %{dep:../../shell/subst_var.ml} CONF_CFLAGS "" %{dep:c-flags.sexp.in})))

(rule
  (with-stdout-to c-libraries.sexp (run ocaml %{dep:../../shell/context_flags.ml} clibs)))
