1 ##############################################################################
3 ##############################################################################
6 SRC
= infiniteArray.ml packedIntArray.ml rowDisplacement.ml engineTypes.ml \
7 engine.ml tableFormat.ml tableInterpreter.ml convert.ml
12 # copy what the menhir authors do
13 EXTRAOPT
=-for-pack MenhirLib
15 ##############################################################################
17 ##############################################################################
18 OCAMLCFLAGS
=-g
-dtypes
21 OCAMLC
=ocamlc
$(OPTBIN
) $(OCAMLCFLAGS
) $(INCLUDES
)
22 OCAMLOPT
= ocamlopt
$(OPTBIN
) $(OPTFLAGS
) $(EXTRAOPT
) $(INCLUDES
)
23 OCAMLOPT2
=ocamlopt
$(OPTBIN
) $(OPTFLAGS
) $(INCLUDES
)
24 OCAMLLEX
=ocamllex
$(OPTBIN
)
25 OCAMLYACC
=ocamlyacc
-v
26 OCAMLDEP
=ocamldep
$(OPTBIN
) $(INCLUDES
)
27 OCAMLMKTOP
=ocamlmktop
-g
-custom
$(INCLUDES
)
30 OPTOBJS
= $(SRC
:.ml
=.cmx
)
33 ##############################################################################
35 ##############################################################################
36 all: $(TARGET
).cma menhirLib.cmo
37 all.opt
: $(TARGET
).cmxa menhirLib.cmx
40 $(TARGET
).cma
: $(OBJS
) $(LIBS
)
41 $(OCAMLC
) -a
-o
$@
$(OBJS
)
43 $(TARGET
).cmxa
: $(OPTOBJS
) $(LIBS
:.cma
=.cmxa
)
44 $(OCAMLOPT
) -a
-o
$@
$(OPTOBJS
)
46 # I thought at first that only one file menhirLib.ml
47 # was needed but in fact it's a wierd cos menhirLib.cmo results from multi
48 # files. They used the -pack ocamlc option, and for strange reason
49 # decided to produce a .cma instead of a classical .cma.
50 # So I put all the necesseray files in this directory.
52 # copy what the menhir authors do in their own makefile
53 menhirLib.cmo
: $(OBJS
)
54 $(OCAMLC
) -pack
-o menhirLib.cmo
$^
56 menhirLib.cmx
: $(OPTOBJS
)
57 $(OCAMLOPT2
) -pack
-o menhirLib.cmx
$^
59 ##############################################################################
61 ##############################################################################
62 .SUFFIXES
: .ml .mli .cmo .cmi .cmx
75 rm -f
*.cm
[ioxa
] *.o
*.a
*.cmxa
*.annot
78 rm -f
*~ .
*~ gmon.out
#*#
83 $(OCAMLDEP
) *.mli
*.ml
> .depend