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.
23 #note: if you add a file (a .mli or .ml), dont forget to do a make depend
25 -include ..
/Makefile.config
29 SRC
= ast_popl.ml asttopopl.ml insert_quantifiers.ml insert_befaft.ml \
30 pretty_print_popl.ml popltoctl.ml popl.ml flag_popl.ml
32 SYSLIBS
=str.cma unix.cma
33 LIBS
=..
/commons
/commons.cma ..
/globals
/globals.cma
35 INCLUDE_PATH
= -I ..
/commons
-I ..
/globals \
36 -I ..
/ctl
-I ..
/parsing_c
-I ..
/parsing_cocci
-I ..
/engine
40 #for profiling: -p -inline 0 with OCAMLOPT
41 CAMLC
=ocamlc
$(OPTBIN
) -dtypes
-g
42 CAMLOPT
=ocamlopt
$(OPTBIN
) $(OPTFLAGS
)
43 CAMLLEX
= ocamllex
$(OPTBIN
)
45 CAMLDEP
= ocamldep
$(OPTBIN
)
46 CAMLMKTOP
=ocamlmktop
-g
-custom
51 OPTLIB
=$(LIB
:.cma
=.cmxa
)
53 OBJS
= $(SRC
:.ml
=.cmo
)
54 OPTOBJS
= $(SRC
:.ml
=.cmx
)
60 $(CAMLMKTOP
) -o
$(TARGET
).top
$(SYSLIBS
) $(LIBS
) $(OBJS
)
63 $(CAMLC
) -a
-o
$(LIB
) $(OBJS
)
66 rm -f
$(LIB
) $(TARGET
).top
70 $(CAMLOPT
) -a
-o
$(OPTLIB
) $(OPTOBJS
)
72 # clean rule for LIB.opt
74 rm -f
$(OPTLIB
) $(LIB
:.cma
=.a
)
78 .SUFFIXES
: .ml .mli .cmo .cmi .cmx
81 $(CAMLC
) $(INCLUDE_PATH
) -c
$<
84 $(CAMLC
) $(INCLUDE_PATH
) -c
$<
87 $(CAMLOPT
) $(INCLUDE_PATH
) -c
$<
92 # clean rule for others files
94 rm -f
*.cm
[iox
] *.o
*.annot
98 $(CAMLDEP
) $(INCLUDE_PATH
) *.mli
*.ml
> .depend
104 $(CAMLDEP
) $(INCLUDE_PATH
) *.mli
*.ml
> .depend