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