1 # Copyright 2010, INRIA, University of Copenhagen
2 # Julia Lawall, Rene Rydhof Hansen, Gilles Muller, Nicolas Palix
3 # Copyright 2005-2009, Ecole des Mines de Nantes, University of Copenhagen
4 # Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller, Nicolas Palix
5 # This file is part of Coccinelle.
7 # Coccinelle is free software: you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation, according to version 2 of the License.
11 # Coccinelle is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with Coccinelle. If not, see <http://www.gnu.org/licenses/>.
19 # The authors reserve the right to distribute this or future versions of
20 # Coccinelle under other licenses.
24 -include ..
/Makefile.config
26 ##############################################################################
28 ##############################################################################
31 SRC
= flag.ml config.ml iteration.ml regexp.ml
34 INCLUDEDIRS
= ..
/commons
$(PCREDIR
)
36 ##############################################################################
38 ##############################################################################
40 INCLUDES
=$(INCLUDEDIRS
:%=-I
%)
42 OCAMLCFLAGS ?
= -g
-dtypes
43 OCAMLC
=ocamlc
$(OPTBIN
) $(OCAMLCFLAGS
) $(INCLUDES
)
44 OCAMLOPT
= ocamlopt
$(OPTBIN
) $(OPTFLAGS
) $(INCLUDES
)
45 OCAMLDEP
= ocamldep
$(OPTBIN
) $(INCLUDES
)
46 OCAMLMKTOP
=ocamlmktop
-g
-custom
$(INCLUDES
)
49 OPTOBJS
= $(SRC
:.ml
=.cmx
)
51 ##############################################################################
53 ##############################################################################
56 all.opt
: $(TARGET
).cmxa
58 $(TARGET
).cma
: $(LIBS
) $(OBJS
)
59 $(OCAMLC
) -a
-o
$(TARGET
).cma
$(OBJS
)
61 $(TARGET
).cmxa
: $(LIBS
:.cma
=.cmxa
) $(OPTOBJS
)
62 $(OCAMLOPT
) -a
-o
$(TARGET
).cmxa
$(OPTOBJS
)
64 ##############################################################################
66 ##############################################################################
67 .SUFFIXES
: .ml .mli .cmo .cmi .cmx
80 rm -f
*.cm
[ioxa
] *.o
*.a
*.cmxa
*.annot
81 rm -f
*~ .
*~ gmon.out
#*#
89 $(OCAMLDEP
) *.mli
*.ml
> .depend