Skip to content

Instantly share code, notes, and snippets.

@toots
Last active December 1, 2019 11:24
Show Gist options
  • Save toots/e2639315c5b62748164529f0763b8303 to your computer and use it in GitHub Desktop.
Save toots/e2639315c5b62748164529f0763b8303 to your computer and use it in GitHub Desktop.
(executable
(name gen_constants_c)
(modules gen_constants_c)
(libraries sys-socket.constants ctypes.stubs))
(rule
(targets gen_constants.c)
(deps (:gen ./gen_constants_c.exe))
(action (run %{gen} %{targets})))
(rule
(targets gen_constants_c)
(deps (:c_code ./gen_constants.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