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 -include ..
/Makefile.config
25 PROGS
=spp gitgrep splitpatch extract_c_and_res
#generate_dependencies
27 all: $(SUBDIRS
) $(PROGS
)
33 ocamlopt
-o gitgrep str.cmxa gitgrep.ml
36 ocamlopt
-o gitsort str.cmxa gitsort.ml
38 isoprof
: process_isoprofile.ml
39 ocamlc
-g
-o isoprof str.cma process_isoprofile.ml
41 alloc_free
: alloc_free.ml
42 ocamlopt
-o alloc_free str.cmxa alloc_free.ml
44 # more flexible version of alloc_free
46 ocamlopt
-o bridge str.cmxa dumper.mli dumper.ml bridge.ml
48 install_bridge
: bridge
49 cp
-f bridge
/usr
/local
/bin
54 SYSLIBS
= str.cma unix.cma bigarray.cma
56 INCLUDE
=-I ..
/commons
-I ..
/extra
-I ..
/parsing_c
57 LIBS
=..
/commons
/commons.cma ..
/globals
/globals.cma \
58 ..
/parsing_c
/parsing_c.cma ..
/extra
/extra.cma
60 OCAMLC
=ocamlc
$(OPTBIN
) -g
-dtypes
$(INCLUDE
)
61 OCAMLOPT
=ocamlopt
$(OPTBIN
) $(INCLUDE
) $(OPTFLAGS
)
62 #OCAMLLEX=ocamllex$(OPTBIN) -ml
63 OCAMLLEX
=ocamllex
$(OPTBIN
)
64 OCAMLYACC
=ocamlyacc
-v
65 OCAMLDEP
=ocamldep
$(OPTBIN
) $(INCLUDE
)
66 OCAMLMKTOP
=ocamlmktop
-g
-custom
$(INCLUDE
)
69 $(OCAMLC
) -o
$@
$(SYSLIBS
) $(INCLUDE
) $(LIBS
) $+
70 # ocamlc -I ../commons/ -o spp str.cma unix.cma bigarray.cma ../commons/common.cmo spp.ml
72 splitpatch
: splitpatch.cmo
73 $(OCAMLC
) -o
$@
$(SYSLIBS
) $(INCLUDE
) $+
75 extract_c_and_res
: extract_c_and_res.cmo
76 $(OCAMLC
) -o
$@
$(SYSLIBS
) $(INCLUDE
) $(LIBS
) $+
78 generate_dependencies
: generate_dependencies.cmo
79 $(OCAMLC
) -o
$@
$(SYSLIBS
) $(INCLUDE
) $(LIBS
) $+
81 .SUFFIXES
: .ml .mli .cmo .cmi .cmx
92 rm -f
*.cm
[ioxa
] *.o
*.a
*.cmxa
*.annot
97 ocamldep
$(INCLUDE
) *.mli
*.ml
> .depend