A generic Makefile for Caml Light

The skeleton for the Make command

Makefile_caml.tpl must be copied as Makefile in the project directory.

Simplified instructions for use

Advanced instructions for use

In addition, the Makefile file offers the following entry points:

If you use Caml libraries (such as graphics, unix, or nums), you must set the line LIBS= with the list of libraries you use. The names of these libraries for Make are listed in the Makefile: each ``name'' is in fact a Make macro that adds the relevant options to the Caml compiler. For instance, to use both ``graphics'' and ``unix'' you should write: LIBS=WITHGRAPHICS WITHUNIX

Make and Emacs

Advanced Caml programmers generally agree that the simplest way of developing Caml programs is to use make from within the emacs editor: call make with the emacs command Meta-X compile. If an error occurs, the editor points to the precise file and line where the Caml compiler found the error, if you type in Meta-X next-error. The command Meta-X compile is generally bound to the keystrokes combination CTRL-C CTRL-C, while Meta-X next-error is bound to CTRL-X `.
This means that the entire compilation + error finding process just needs to 4 key-strokes.

Caml home page Last modified: Friday, March 26, 2004
Copyright © 1995 - 2004, INRIA all rights reserved.

Contact the author Pierre.Weis@inria.fr