[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Dario Teixeira <darioteixeira@y...> |
| Subject: | Re: [Caml-list] Ocamlbuild for project with C portion |
Hi,
> The key is to create a file with the extension ".clib" that contains
> the list of .o files that should be compiled from your C stubs. Ocamlbuild
> will then build these into a libary (foo.clib will result in foo.a). You
> then add rules in myocamlbuild.ml that define tags for depending on and
> linking with that library, and add these to your _tags file.
Thanks for your reply. In the end I managed to solve the problem, though
not using clib (which seems tangential to this problem). All that was
required was the following myocamlbuild.ml:
open Ocamlbuild_plugin
open Command
let _ = dispatch begin function
| After_rules ->
flag ["ocaml"; "byte"; "link"] (S[A"-custom"]);
dep ["ocaml"; "link"] ["foobar.o"]
| _ -> ()
end
Though it still strikes me as odd that Ocamlbuild's manual won't cover
such basic examples...
Best regards,
Dario Teixeira