diff --git a/Makefile b/Makefile index de6777b..2fbe7c7 100644 --- a/Makefile +++ b/Makefile @@ -4,8 +4,8 @@ OCAMLOPT_FLAGS:=-output-complete-obj .PHONY: ocaml ocaml: - dune build ocaml/hello.a - cp _build/default/ocaml/hello.a $(BUILD)/libfoo.a + dune build --verbose ocaml/hello.exe.o + ar -rs $(BUILD)/libfoo.a _build/default/ocaml/hello.exe.o ocaml-manual: mkdir -p $(BUILD) diff --git a/ocaml/dune b/ocaml/dune index 9cf3196..d025526 100644 --- a/ocaml/dune +++ b/ocaml/dune @@ -1,2 +1,3 @@ -(library - (name hello)) +(executable + (name hello) + (modes object)) diff --git a/ocaml/hello.ml b/ocaml/hello.ml index 5e53ef7..e90a873 100644 --- a/ocaml/hello.ml +++ b/ocaml/hello.ml @@ -2,3 +2,4 @@ let hello () = "hello" let () = Callback.register "Hello callback" hello; + Callback.register "Bye callback" Bye.bye;