(executable
 (name gen_type_bindings)
 (modules gen_type_bindings)
 (libraries ctypes.stubs c_type_description))

(rule
 (target gen_type_bindings.c)
 (action
  (with-stdout-to
   %{target}
   (run ./gen_type_bindings.exe))))

(rule
 (targets gen_type_bindings_from_c.exe)
 (deps gen_type_bindings.c)
 (action
  (bash
   "%{cc} %{deps} -I `dirname %{lib:ctypes:ctypes_cstubs_internals.h}` -I %{ocaml_where} -o %{targets}")))

(executable
 (name gen_function_bindings)
 (modules gen_function_bindings)
 (libraries ctypes.stubs c_function_description))
