ocaml-libusb/lib/generator/generator.ml
Matthieu Dubuget b7376530ea Commit initial
2018-06-07 14:31:53 +02:00

17 lines
415 B
OCaml

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