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.
25 #note: if you add a file (a .mli or .ml), dont forget to do a make depend
27 -include ..
/Makefile.config
31 SRC
= ast_popl.ml asttopopl.ml insert_quantifiers.ml insert_befaft.ml \
32 pretty_print_popl.ml popltoctl.ml popl.ml flag_popl.ml
34 SYSLIBS
=str.cma unix.cma
35 LIBS
=..
/commons
/commons.cma ..
/globals
/globals.cma
37 INCLUDE_PATH
= -I ..
/commons
-I ..
/globals \
38 -I ..
/ctl
-I ..
/parsing_c
-I ..
/parsing_cocci
-I ..
/engine
42 #for profiling: -p -inline 0 with OCAMLOPT
43 CAMLC
=ocamlc
$(OPTBIN
) -dtypes
-g
44 CAMLOPT
=ocamlopt
$(OPTBIN
) $(OPTFLAGS
)
45 CAMLLEX
= ocamllex
$(OPTBIN
)
47 CAMLDEP
= ocamldep
$(OPTBIN
)
48 CAMLMKTOP
=ocamlmktop
-g
-custom
53 OPTLIB
=$(LIB
:.cma
=.cmxa
)
55 OBJS
= $(SRC
:.ml
=.cmo
)
56 OPTOBJS
= $(SRC
:.ml
=.cmx
)
62 $(CAMLMKTOP
) -o
$(TARGET
).top
$(SYSLIBS
) $(LIBS
) $(OBJS
)
65 $(CAMLC
) -a
-o
$(LIB
) $(OBJS
)
68 rm -f
$(LIB
) $(TARGET
).top
72 $(CAMLOPT
) -a
-o
$(OPTLIB
) $(OPTOBJS
)
74 # clean rule for LIB.opt
76 rm -f
$(OPTLIB
) $(LIB
:.cma
=.a
)
80 .SUFFIXES
: .ml .mli .cmo .cmi .cmx
83 $(CAMLC
) $(INCLUDE_PATH
) -c
$<
86 $(CAMLC
) $(INCLUDE_PATH
) -c
$<
89 $(CAMLOPT
) $(INCLUDE_PATH
) -c
$<
94 # clean rule for others files
96 rm -f
*.cm
[iox
] *.o
*.annot
100 $(CAMLDEP
) $(INCLUDE_PATH
) *.mli
*.ml
> .depend
106 $(CAMLDEP
) $(INCLUDE_PATH
) *.mli
*.ml
> .depend