2 ms·
These links explain the extra files: https://ocaml.org/learn/tutorials/filenames.html https://ocaml.org/learn/tutorials/filenames.html https://realworldocaml.or
by rwmj 9y ago
These links explain the extra files: https://ocaml.org/learn/tutorials/filenames.html https://ocaml.org/learn/tutorials/filenames.html https://realworldocaml.org/v1/en/html/the-compiler-frontend-parsing-and-type-checking.html https://realworldocaml.org/v1/en/html/the-compiler-frontend-... https://realworldocaml.org/v1/en/html/the-compiler-backend-byte-code-and-native-code.html https://realworldocaml.org/v1/en/html/the-compiler-backend-b...
The cmx data could be converted to ELF note sections, but the whole thing has to work on Windows as well, so I guess they didn't want to depend on ELF.
In most projects, you can add this to your Makefile and forget about it:
.mli.cmi:
ocamlfind ocamlc $(OCAMLFLAGS) $(OCAMLPACKAGES) \
-c $< -o $@
.ml.cmo:
ocamlfind ocamlc $(OCAMLFLAGS) $(OCAMLPACKAGES) \
-c $< -o $@
.ml.cmx:
ocamlfind ocamlopt $(OCAMLFLAGS) $(OCAMLPACKAGES) \
-c $< -o $@
clean:
rm -f *.cmi *.cmo *.cmx *.cma *.cmxa
- pjmlp 9y agoThanks for the hints.