1 .\"**************************************************************************
2 .\"* *
3 .\"* OCaml *
4 .\"* *
5 .\"* Xavier Leroy, projet Cristal, INRIA Rocquencourt *
6 .\"* *
7 .\"* Copyright 1999 Institut National de Recherche en Informatique et *
8 .\"* en Automatique. *
9 .\"* *
10 .\"* All rights reserved. This file is distributed under the terms of *
11 .\"* the GNU Lesser General Public License version 2.1, with the *
12 .\"* special exception on linking described in the file LICENSE. *
13 .\"* *
14 .\"**************************************************************************
15 .\"
16 .TH OCAMLMKTOP 1
17
18 .SH NAME
19 ocamlmktop \- Building custom toplevel systems
20
21 .SH SYNOPSIS
22 .B ocamlmktop
23 [
24 .BR \-v | \-version | \-vnum
25 ]
26 [
27 .BI \-cclib \ libname
28 ]
29 [
30 .BI \-ccopt \ option
31 ]
32 [
33 .B \-custom
34 [
35 .BI \-o \ exec-file
36 ]
37 [
38 .BI \-I \ lib-dir
39 ]
40 .I filename ...
41
42 .SH DESCRIPTION
43
44 The
45 .BR ocamlmktop (1)
46 command builds OCaml toplevels that
47 contain user code preloaded at start-up.
48 The
49 .BR ocamlmktop (1)
50 command takes as argument a set of
51 .IR x .cmo
52 and
53 .IR x .cma
54 files, and links them with the object files that implement the
55 OCaml toplevel. If the
56 .B \-custom
57 flag is given, C object files and libraries (.o and .a files) can also
58 be given on the command line and are linked in the resulting toplevel.
59
60 .SH OPTIONS
61
62 The following command-line options are recognized by
63 .BR ocamlmktop (1).
64 .TP
65 .B \-v
66 Print the version string of the compiler and exit.
67 .TP
68 .BR \-vnum \ or\ \-version
69 Print the version number of the compiler in short form and exit.
70 .TP
71 .BI \-cclib\ \-l libname
72 Pass the
73 .BI \-l libname
74 option to the C linker when linking in
75 ``custom runtime'' mode (see the corresponding option for
76 .BR ocamlc (1).
77 .TP
78 .B \-ccopt
79 Pass the given option to the C compiler and linker, when linking in
80 ``custom runtime'' mode. See the corresponding option for
81 .BR ocamlc (1).
82 .TP
83 .B \-custom
84 Link in ``custom runtime'' mode. See the corresponding option for
85 .BR ocamlc (1).
86 .TP
87 .BI \-I \ directory
88 Add the given directory to the list of directories searched for
89 compiled interface files (.cmo and .cma).
90 .TP
91 .BI \-o \ exec\-file
92 Specify the name of the toplevel file produced by the linker.
93 The default is is
94 .BR a.out .
95
96 .SH SEE ALSO
97 .BR ocamlc (1).
98