1 # Copyright 2005-2009, Ecole des Mines de Nantes, University of Copenhagen
2 # Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller, Nicolas Palix
3 # This file is part of Coccinelle.
5 # Coccinelle is free software: you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation, according to version 2 of the License.
9 # Coccinelle is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with Coccinelle. If not, see <http://www.gnu.org/licenses/>.
17 # The authors reserve the right to distribute this or future versions of
18 # Coccinelle under other licenses.
21 #note: if you add a file (a .mli or .ml), dont forget to do a make depend
23 -include ..
/Makefile.config
27 SRC
= ast_popl.ml asttopopl.ml insert_quantifiers.ml insert_befaft.ml \
28 pretty_print_popl.ml popltoctl.ml popl.ml flag_popl.ml
30 SYSLIBS
=str.cma unix.cma
31 LIBS
=..
/commons
/commons.cma ..
/globals
/globals.cma
33 INCLUDE_PATH
= -I ..
/commons
-I ..
/globals \
34 -I ..
/ctl
-I ..
/parsing_c
-I ..
/parsing_cocci
-I ..
/engine
38 #for profiling: -p -inline 0 with OCAMLOPT
39 CAMLC
=ocamlc
$(OPTBIN
) -dtypes
-g
40 CAMLOPT
=ocamlopt
$(OPTBIN
) $(OPTFLAGS
)
41 CAMLLEX
= ocamllex
$(OPTBIN
)
43 CAMLDEP
= ocamldep
$(OPTBIN
)
44 CAMLMKTOP
=ocamlmktop
-g
-custom
49 OPTLIB
=$(LIB
:.cma
=.cmxa
)
51 OBJS
= $(SRC
:.ml
=.cmo
)
52 OPTOBJS
= $(SRC
:.ml
=.cmx
)
58 $(CAMLMKTOP
) -o
$(TARGET
).top
$(SYSLIBS
) $(LIBS
) $(OBJS
)
61 $(CAMLC
) -a
-o
$(LIB
) $(OBJS
)
64 rm -f
$(LIB
) $(TARGET
).top
68 $(CAMLOPT
) -a
-o
$(OPTLIB
) $(OPTOBJS
)
70 # clean rule for LIB.opt
72 rm -f
$(OPTLIB
) $(LIB
:.cma
=.a
)
76 .SUFFIXES
: .ml .mli .cmo .cmi .cmx
79 $(CAMLC
) $(INCLUDE_PATH
) -c
$<
82 $(CAMLC
) $(INCLUDE_PATH
) -c
$<
85 $(CAMLOPT
) $(INCLUDE_PATH
) -c
$<
90 # clean rule for others files
92 rm -f
*.cm
[iox
] *.o
*.annot
96 $(CAMLDEP
) $(INCLUDE_PATH
) *.mli
*.ml
> .depend
102 $(CAMLDEP
) $(INCLUDE_PATH
) *.mli
*.ml
> .depend