Skip to content

Instantly share code, notes, and snippets.

@toots
Created December 1, 2019 16:39
Show Gist options
  • Save toots/4b0ebab9ac6979daa5f422dcd609a8f4 to your computer and use it in GitHub Desktop.
Save toots/4b0ebab9ac6979daa5f422dcd609a8f4 to your computer and use it in GitHub Desktop.
(executable
(name gen_types_c)
(modules gen_types_c)
(libraries sys-socket.types ctypes.stubs))
(rule
(targets gen_types.c)
(deps (:gen ./gen_types_c.exe))
(action (run %{gen} %{targets})))
(rule
(targets gen_types_c)
(deps (:c_code ./gen_types.c))
(action (run %{ocaml-config:c_compiler} -I %{lib:ctypes:} -I %{ocaml-config:standard_library} -o %{targets} %{c_code})))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment