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 -include ..
/Makefile.config
27 PROGS
=spp gitgrep splitpatch extract_c_and_res
#generate_dependencies
29 all: $(SUBDIRS
) $(PROGS
)
35 ocamlopt
-o gitgrep str.cmxa gitgrep.ml
38 ocamlopt
-o gitsort str.cmxa gitsort.ml
40 isoprof
: process_isoprofile.ml
41 ocamlc
-g
-o isoprof str.cma process_isoprofile.ml
43 alloc_free
: alloc_free.ml
44 ocamlopt
-o alloc_free str.cmxa alloc_free.ml
46 # more flexible version of alloc_free
48 ocamlopt
-o bridge str.cmxa dumper.mli dumper.ml bridge.ml
50 install_bridge
: bridge
51 cp
-f bridge
/usr
/local
/bin
56 SYSLIBS
= str.cma unix.cma bigarray.cma
58 INCLUDE
=-I ..
/commons
-I ..
/extra
-I ..
/parsing_c
59 LIBS
=..
/commons
/commons.cma ..
/globals
/globals.cma \
60 ..
/parsing_c
/parsing_c.cma ..
/extra
/extra.cma
62 OCAMLC
=ocamlc
$(OPTBIN
) -g
-dtypes
$(INCLUDE
)
63 OCAMLOPT
=ocamlopt
$(OPTBIN
) $(INCLUDE
) $(OPTFLAGS
)
64 #OCAMLLEX=ocamllex$(OPTBIN) -ml
65 OCAMLLEX
=ocamllex
$(OPTBIN
)
66 OCAMLYACC
=ocamlyacc
-v
67 OCAMLDEP
=ocamldep
$(OPTBIN
) $(INCLUDE
)
68 OCAMLMKTOP
=ocamlmktop
-g
-custom
$(INCLUDE
)
71 $(OCAMLC
) -o
$@
$(SYSLIBS
) $(INCLUDE
) $(LIBS
) $+
72 # ocamlc -I ../commons/ -o spp str.cma unix.cma bigarray.cma ../commons/common.cmo spp.ml
74 splitpatch
: splitpatch.cmo
75 $(OCAMLC
) -o
$@
$(SYSLIBS
) $(INCLUDE
) $+
77 extract_c_and_res
: extract_c_and_res.cmo
78 $(OCAMLC
) -o
$@
$(SYSLIBS
) $(INCLUDE
) $(LIBS
) $+
80 generate_dependencies
: generate_dependencies.cmo
81 $(OCAMLC
) -o
$@
$(SYSLIBS
) $(INCLUDE
) $(LIBS
) $+
83 .SUFFIXES
: .ml .mli .cmo .cmi .cmx
94 rm -f
*.cm
[ioxa
] *.o
*.a
*.cmxa
*.annot
99 ocamldep
$(INCLUDE
) *.mli
*.ml
> .depend