ocaml-libusb/lib/generator/generator.ml

17 lines
415 B
OCaml
Raw Permalink Normal View History

2018-06-07 12:31:53 +00:00
open G
let () =
(*** C part ***)
let oc = open_out "cstub_libusb.c" in
let cstub = Format.formatter_of_out_channel oc in
Format.fprintf cstub "#include <libusb.h>\n";
Cstubs.write_c cstub "libusb" (module P);
close_out oc;
(*** ML part ***)
let oc = open_out "bindings.ml" in
let bindings = Format.formatter_of_out_channel oc in
Cstubs.write_ml bindings "libusb" (module P);
close_out oc