ocaml-libusb/lib/jbuild

31 lines
750 B
Plaintext
Raw Normal View History

2018-06-07 12:31:53 +00:00
(library(
(name libusb)
(public_name libusb)
(libraries (ctypes))
(c_names (cstub_libusb))
(c_flags (:include libusb_cflags_and_no_discarded_qualifiers))
(c_library_flags (-lusb-1.0))
))
(rule(
(targets (libusb_cflags_and_no_discarded_qualifiers))
(deps (generator/stubs/libusb_cflags))
(action (with-stdout-to ${@}
(progn
(echo "(")
(cat ${<})
(echo " -Wno-discarded-qualifiers")
(echo ")")
)
))
))
(copy_files generator/g.ml)
(copy_files generator/stubs/{t,my_types}.ml)
(rule(
(targets (cstub_libusb.c bindings.ml))
(deps (generator/generator.exe))
(action (run ${<}))
))