2 -include ..
/Makefile.config
4 ##############################################################################
6 ##############################################################################
9 SRC
= infiniteArray.ml packedIntArray.ml rowDisplacement.ml engineTypes.ml \
10 engine.ml tableFormat.ml tableInterpreter.ml convert.ml
15 # copy what the menhir authors do
16 EXTRAOPT
=-for-pack MenhirLib
18 ##############################################################################
20 ##############################################################################
21 OCAMLCFLAGS ?
=-g
-dtypes
24 OCAMLC
=ocamlc
$(OPTBIN
) $(OCAMLCFLAGS
) $(INCLUDES
)
25 OCAMLOPT
= ocamlopt
$(OPTBIN
) $(OPTFLAGS
) $(EXTRAOPT
) $(INCLUDES
)
26 OCAMLOPT2
=ocamlopt
$(OPTBIN
) $(OPTFLAGS
) $(INCLUDES
)
27 OCAMLLEX
=ocamllex
$(OPTBIN
)
28 OCAMLYACC
=ocamlyacc
-v
29 OCAMLDEP
=ocamldep
$(OPTBIN
) $(INCLUDES
)
30 OCAMLMKTOP
=ocamlmktop
-g
-custom
$(INCLUDES
)
33 OPTOBJS
= $(SRC
:.ml
=.cmx
)
36 ##############################################################################
38 ##############################################################################
39 all: $(TARGET
).cma menhirLib.cmo
40 all.opt
: $(TARGET
).cmxa menhirLib.cmx
43 $(TARGET
).cma
: $(OBJS
) $(LIBS
)
44 $(OCAMLC
) -a
-o
$@
$(OBJS
)
46 $(TARGET
).cmxa
: $(OPTOBJS
) $(LIBS
:.cma
=.cmxa
)
47 $(OCAMLOPT
) -a
-o
$@
$(OPTOBJS
)
49 # I thought at first that only one file menhirLib.ml
50 # was needed but in fact it's a wierd cos menhirLib.cmo results from multi
51 # files. They used the -pack ocamlc option, and for strange reason
52 # decided to produce a .cma instead of a classical .cma.
53 # So I put all the necesseray files in this directory.
55 # copy what the menhir authors do in their own makefile
56 menhirLib.cmo
: $(OBJS
)
57 $(OCAMLC
) -pack
-o menhirLib.cmo
$^
59 menhirLib.cmx
: $(OPTOBJS
)
60 $(OCAMLOPT2
) -pack
-o menhirLib.cmx
$^
62 ##############################################################################
64 ##############################################################################
65 .SUFFIXES
: .ml .mli .cmo .cmi .cmx
78 rm -f
*.cm
[ioxa
] *.o
*.a
*.cmxa
*.annot
81 rm -f
*~ .
*~ gmon.out
#*#
86 $(OCAMLDEP
) *.mli
*.ml
> .depend