[Omake] Interfacing with C code
Luis O'Shea
loshea at gmail.com
Sat Feb 2 20:26:14 PST 2008
I was trying to compile a simple example of OCaml calling C (much
like http://caml.inria.fr/pub/docs/manual-ocaml/
manual032.html#htoc232). The commands I would like omake to execute
are:
ocamlc -c foo.mli # (1)
ocamlc -c foo_stubs.c # (2)
ocamlc -custom -o foobar test_foo.ml foo_stubs.o # (3)
What is the best way to get omake to do this (or something similar)?
OCamlLibrary(libmysys, mysys) will take care of (1). Is it the best
way?
StaticCLibrary(foo_stubs, foo_stubs) will take care of (2), although
using the C compiler (which requires finding and setting INCLUDES to
where the ocaml headers are) rather than via ocamlc.
But how do I get the .o file onto the command line in (3) (without
using a kludge)?
Thanks.
More information about the Omake
mailing list