Release coccinelle-0.2.0rc1
[bpt/coccinelle.git] / popl / Makefile
CommitLineData
951c7801
C
1#note: if you add a file (a .mli or .ml), dont forget to do a make depend
2
3-include ../Makefile.config
4
5TARGET = popl
6
7SRC = ast_popl.ml asttopopl.ml insert_quantifiers.ml insert_befaft.ml \
8pretty_print_popl.ml popltoctl.ml popl.ml flag_popl.ml
9
10SYSLIBS=str.cma unix.cma
11LIBS=../commons/commons.cma ../globals/globals.cma
12
13INCLUDE_PATH = -I ../commons -I ../globals \
14 -I ../ctl -I ../parsing_c -I ../parsing_cocci -I ../engine
15
16#The Caml compilers.
17#for warning: -w A
18#for profiling: -p -inline 0 with OCAMLOPT
19CAMLC =ocamlc$(OPTBIN) -dtypes -g
20CAMLOPT=ocamlopt$(OPTBIN) $(OPTFLAGS)
21CAMLLEX = ocamllex$(OPTBIN)
22CAMLYACC= ocamlyacc
23CAMLDEP = ocamldep$(OPTBIN)
24CAMLMKTOP=ocamlmktop -g -custom
25
26
27
28LIB=$(TARGET).cma
29OPTLIB=$(LIB:.cma=.cmxa)
30
31OBJS = $(SRC:.ml=.cmo)
32OPTOBJS = $(SRC:.ml=.cmx)
33
34all: $(LIB)
35all.opt: $(OPTLIB)
36
37$(TARGET).top: $(LIB)
38 $(CAMLMKTOP) -o $(TARGET).top $(SYSLIBS) $(LIBS) $(OBJS)
39
40$(LIB): $(OBJS)
41 $(CAMLC) -a -o $(LIB) $(OBJS)
42
43clean::
44 rm -f $(LIB) $(TARGET).top
45
46
47$(OPTLIB): $(OPTOBJS)
48 $(CAMLOPT) -a -o $(OPTLIB) $(OPTOBJS)
49
50# clean rule for LIB.opt
51clean::
52 rm -f $(OPTLIB) $(LIB:.cma=.a)
53
54
55.SUFFIXES:
56.SUFFIXES: .ml .mli .cmo .cmi .cmx
57
58.ml.cmo:
59 $(CAMLC) $(INCLUDE_PATH) -c $<
60
61.mli.cmi:
62 $(CAMLC) $(INCLUDE_PATH) -c $<
63
64.ml.cmx:
65 $(CAMLOPT) $(INCLUDE_PATH) -c $<
66
67
68
69
70# clean rule for others files
71clean::
72 rm -f *.cm[iox] *.o *.annot
73 rm -f *~ .*~ #*#
74
75depend:
76 $(CAMLDEP) $(INCLUDE_PATH) *.mli *.ml > .depend
77
78distclean::
79 rm -f .depend
80
81.depend:
82 $(CAMLDEP) $(INCLUDE_PATH) *.mli *.ml > .depend
83
84-include .depend