31 lines
750 B
Plaintext
31 lines
750 B
Plaintext
|
(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 ${<}))
|
||
|
))
|