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 \
13 visitor_c.ml lib_parsing_c.ml \
14 control_flow_c_build.ml \
16 semantic_c.ml lexer_parser.ml parser_c.ml lexer_c.ml \
17 token_helpers.ml token_views_c.ml \
18 cpp_token_c.ml parsing_hacks.ml \
19 unparse_cocci.ml unparse_c.ml unparse_hrule.ml \
20 parse_c.ml type_c.ml \
22 type_annoter_c.ml comment_annotater_c.ml \
28 # ast_cocci.ml and unparse_cocci.ml should be deleted in the futur
29 # to make parsing_c really independent of coccinelle.
30 # control_flow_c have also coccinelle dependencies.
31 # old: parsing_c now depends on cocci_parser because in addition to decorate
32 # the token in Ast_c with some parse info, we now also make some place to
33 # welcome some mcodekind of Ast_cocci.
34 LIBS
=..
/commons
/commons.cma ..
/globals
/globals.cma \
35 ..
/parsing_cocci
/cocci_parser.cma
37 INCLUDES
= -I ..
/commons
-I ..
/commons
/ocamlextra
-I ..
/commons
/ocollection \
38 -I ..
/globals
-I ..
/parsing_cocci
40 #LIBS=../commons/commons.cma
41 #INCLUDES= -I ../commons
42 SYSLIBS
= str.cma unix.cma num.cma
44 ##############################################################################
46 ##############################################################################
49 #for profiling: -p -inline 0 with OCAMLOPT
50 OCAMLCFLAGS ?
= -g
-dtypes
52 OCAMLC
=ocamlc
$(OPTBIN
) $(OCAMLCFLAGS
) $(INCLUDES
)
53 OCAMLOPT
=ocamlopt
$(OPTBIN
) $(OPTFLAGS
) $(INCLUDES
)
54 OCAMLLEX
=ocamllex
$(OPTBIN
) #-ml
55 OCAMLYACC
=ocamlyacc
-v
56 OCAMLDEP
=ocamldep
$(OPTBIN
) $(INCLUDES
)
57 OCAMLMKTOP
=ocamlmktop
-g
-custom
$(INCLUDES
)
60 OBJS
= $(SRC
:.ml
=.cmo
)
61 OPTOBJS
= $(SRC
:.ml
=.cmx
)
64 ##############################################################################
66 ##############################################################################
68 all.opt
: $(TARGET
).cmxa
70 $(TARGET
).cma
: $(OBJS
)
71 $(OCAMLC
) -a
-o
$(TARGET
).cma
$(OBJS
)
73 $(TARGET
).cmxa
: $(OPTOBJS
) $(LIBS
:.cma
=.cmxa
)
74 $(OCAMLOPT
) -a
-o
$(TARGET
).cmxa
$(OPTOBJS
)
76 $(TARGET
).top
: $(OBJS
) $(LIBS
)
77 $(OCAMLMKTOP
) -o
$(TARGET
).top
$(SYSLIBS
) $(LIBS
) $(OBJS
)
82 lexer_c.ml
: lexer_c.mll
86 beforedepend
:: lexer_c.ml
89 parser_c.ml parser_c.mli
: parser_c.mly
92 rm -f parser_c.ml parser_c.mli parser_c.output
93 beforedepend
:: parser_c.ml parser_c.mli
96 ##############################################################################
98 ##############################################################################
99 # visitor_c.ml lib_parsing_c.ml \
100 # type_annoter_c.ml \
102 # pretty_print_c.ml unparse_c.ml \
104 #toreput: compare_c.ml ast_to_flow.ml
106 COREPARSING
= flag_parsing_c.ml parsing_stat.ml \
108 ast_c.ml control_flow_c.ml \
109 semantic_c.ml lexer_parser.ml parser_c.mly lexer_c.mll \
110 token_helpers.ml parsing_hacks.ml parse_c.ml \
118 wc
-l parsing_hacks.ml
123 ##############################################################################
125 ##############################################################################
127 .SUFFIXES
: .ml .mli .cmo .cmi .cmx
140 rm -f
*.cm
[ioxa
] *.o
*.a
*.cmxa
*.annot
141 rm -f
*~ .
*~ gmon.out
#*#
151 depend
:: beforedepend
152 $(OCAMLDEP
) *.mli
*.ml
> .depend