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 -include ..
/Makefile.config
23 PROGS
=spp gitgrep split_patch extract_c_and_res
#generate_dependencies
25 all: $(SUBDIRS
) $(PROGS
)
31 ocamlopt
-o gitgrep str.cmxa gitgrep.ml
34 ocamlopt
-o gitsort str.cmxa gitsort.ml
36 isoprof
: process_isoprofile.ml
37 ocamlc
-g
-o isoprof str.cma process_isoprofile.ml
39 alloc_free
: alloc_free.ml
40 ocamlopt
-o alloc_free str.cmxa alloc_free.ml
42 # more flexible version of alloc_free
44 ocamlopt
-o bridge str.cmxa bridge.ml
46 install_bridge
: bridge
47 cp
-f bridge
/usr
/local
/bin
52 SYSLIBS
= str.cma unix.cma bigarray.cma
54 INCLUDE
=-I ..
/commons
-I ..
/extra
-I ..
/parsing_c
55 LIBS
=..
/commons
/commons.cma ..
/globals
/globals.cma \
56 ..
/parsing_c
/parsing_c.cma ..
/extra
/extra.cma
58 OCAMLC
=ocamlc
$(OPTBIN
) -g
-dtypes
$(INCLUDE
)
59 OCAMLOPT
=ocamlopt
$(OPTBIN
) $(INCLUDE
) $(OPTFLAGS
)
60 #OCAMLLEX=ocamllex$(OPTBIN) -ml
61 OCAMLLEX
=ocamllex
$(OPTBIN
)
62 OCAMLYACC
=ocamlyacc
-v
63 OCAMLDEP
=ocamldep
$(OPTBIN
) $(INCLUDE
)
64 OCAMLMKTOP
=ocamlmktop
-g
-custom
$(INCLUDE
)
67 $(OCAMLC
) -o
$@
$(SYSLIBS
) $(INCLUDE
) $(LIBS
) $+
68 # ocamlc -I ../commons/ -o spp str.cma unix.cma bigarray.cma ../commons/common.cmo spp.ml
70 split_patch
: split_patch.cmo
71 $(OCAMLC
) -o
$@
$(SYSLIBS
) $(INCLUDE
) $(LIBS
) $+
73 extract_c_and_res
: extract_c_and_res.cmo
74 $(OCAMLC
) -o
$@
$(SYSLIBS
) $(INCLUDE
) $(LIBS
) $+
76 generate_dependencies
: generate_dependencies.cmo
77 $(OCAMLC
) -o
$@
$(SYSLIBS
) $(INCLUDE
) $(LIBS
) $+
79 .SUFFIXES
: .ml .mli .cmo .cmi .cmx
90 rm -f
*.cm
[ioxa
] *.o
*.a
*.cmxa
*.annot
95 ocamldep
$(INCLUDE
) *.mli
*.ml
> .depend