2 -include ..
/Makefile.config
4 ##############################################################################
6 ##############################################################################
10 # - type_cocci.ml ast_cocci.ml # + unparse_hrule
11 SRC
= flag_parsing_c.ml parsing_stat.ml \
12 token_c.ml ast_c.ml control_flow_c.ml type_c.ml \
13 visitor_c.ml lib_parsing_c.ml \
16 semantic_c.ml lexer_parser.ml parser_c.ml lexer_c.ml \
17 token_helpers.ml parsing_hacks.ml \
18 unparse_cocci.ml unparse_c.ml unparse_hrule.ml \
21 type_annoter_c.ml comment_annotater_c.ml \
27 # ast_cocci.ml and unparse_cocci.ml should be deleted in the futur
28 # to make parsing_c really independent of coccinelle.
29 # control_flow_c have also coccinelle dependencies.
30 # old: parsing_c now depends on cocci_parser because in addition to decorate
31 # the token in Ast_c with some parse info, we now also make some place to
32 # welcome some mcodekind of Ast_cocci.
33 LIBS
=..
/commons
/commons.cma ..
/globals
/globals.cma \
34 ..
/parsing_cocci
/cocci_parser.cma
36 INCLUDES
= -I ..
/commons
-I ..
/commons
/ocamlextra
-I ..
/commons
/ocollection \
37 -I ..
/globals
-I ..
/parsing_cocci
39 #LIBS=../commons/commons.cma
40 #INCLUDES= -I ../commons
41 SYSLIBS
= str.cma unix.cma
43 ##############################################################################
45 ##############################################################################
48 #for profiling: -p -inline 0 with OCAMLOPT
49 OCAMLCFLAGS ?
= -g
-dtypes
51 OCAMLC
=ocamlc
$(OPTBIN
) $(OCAMLCFLAGS
) $(INCLUDES
)
52 OCAMLOPT
=ocamlopt
$(OPTBIN
) $(OPTFLAGS
) $(INCLUDES
)
53 OCAMLLEX
=ocamllex
$(OPTBIN
) #-ml
54 OCAMLYACC
=ocamlyacc
-v
55 OCAMLDEP
=ocamldep
$(OPTBIN
) $(INCLUDES
)
56 OCAMLMKTOP
=ocamlmktop
-g
-custom
$(INCLUDES
)
59 OBJS
= $(SRC
:.ml
=.cmo
)
60 OPTOBJS
= $(SRC
:.ml
=.cmx
)
63 ##############################################################################
65 ##############################################################################
67 all.opt
: $(TARGET
).cmxa
69 $(TARGET
).cma
: $(OBJS
)
70 $(OCAMLC
) -a
-o
$(TARGET
).cma
$(OBJS
)
72 $(TARGET
).cmxa
: $(OPTOBJS
) $(LIBS
:.cma
=.cmxa
)
73 $(OCAMLOPT
) -a
-o
$(TARGET
).cmxa
$(OPTOBJS
)
75 $(TARGET
).top
: $(OBJS
) $(LIBS
)
76 $(OCAMLMKTOP
) -o
$(TARGET
).top
$(SYSLIBS
) $(LIBS
) $(OBJS
)
83 lexer_c.ml
: lexer_c.mll
87 beforedepend
:: lexer_c.ml
90 parser_c.ml parser_c.mli
: parser_c.mly
93 rm -f parser_c.ml parser_c.mli parser_c.output
94 beforedepend
:: parser_c.ml parser_c.mli
97 ##############################################################################
99 ##############################################################################
100 # visitor_c.ml lib_parsing_c.ml \
101 # type_annoter_c.ml \
103 # pretty_print_c.ml unparse_c.ml \
105 #toreput: compare_c.ml ast_to_flow.ml
107 COREPARSING
= flag_parsing_c.ml parsing_stat.ml \
109 ast_c.ml control_flow_c.ml \
110 semantic_c.ml lexer_parser.ml parser_c.mly lexer_c.mll \
111 token_helpers.ml parsing_hacks.ml parse_c.ml \
119 wc
-l parsing_hacks.ml
124 ##############################################################################
126 ##############################################################################
128 .SUFFIXES
: .ml .mli .cmo .cmi .cmx
141 rm -f
*.cm
[ioxa
] *.o
*.a
*.cmxa
*.annot
142 rm -f
*~ .
*~ gmon.out
#*#
149 depend
:: beforedepend
150 $(OCAMLDEP
) *.mli
*.ml
> .depend