##############################################################################
TARGET=parsing_c
+-include ../Makefile.config
+
+ifeq ($(FEATURE_TARZAN), 1)
+TARZANSRC=sexp_ast_c.ml
+ifeq ("$(SEXPDIR)","ocamlsexp")
+TARZANINCLUDE=-I ../$(SEXPDIR)
+else
+TARZANINCLUDE=-I $(SEXPDIR)
+endif # Use local ocamlsexp
+endif # FEATURE_TARZAN
+
+
# - type_cocci.ml ast_cocci.ml # + unparse_hrule
SRC= flag_parsing_c.ml parsing_stat.ml \
- token_c.ml ast_c.ml control_flow_c.ml type_c.ml \
+ token_c.ml ast_c.ml control_flow_c.ml \
+ $(TARZANSRC) \
visitor_c.ml lib_parsing_c.ml \
- ast_to_flow.ml \
+ control_flow_c_build.ml \
pretty_print_c.ml \
semantic_c.ml lexer_parser.ml parser_c.ml lexer_c.ml \
- token_helpers.ml parsing_hacks.ml \
+ token_helpers.ml token_views_c.ml \
+ cpp_token_c.ml \
+ parsing_hacks.ml \
+ cpp_analysis_c.ml \
unparse_cocci.ml unparse_c.ml unparse_hrule.ml \
- parse_c.ml \
+ parsing_recovery_c.ml parsing_consistency_c.ml \
+ parse_c.ml type_c.ml \
cpp_ast_c.ml \
type_annoter_c.ml comment_annotater_c.ml \
compare_c.ml \
LIBS=../commons/commons.cma ../globals/globals.cma \
../parsing_cocci/cocci_parser.cma
-INCLUDES= -I ../commons -I ../commons/ocamlextra -I ../commons/ocollection \
+INCLUDESDEP= -I ../commons -I ../commons/ocamlextra -I ../commons/ocollection \
-I ../globals -I ../parsing_cocci
+INCLUDES=$(INCLUDESDEP) $(TARZANINCLUDE)
+
#LIBS=../commons/commons.cma
#INCLUDES= -I ../commons
-SYSLIBS= str.cma unix.cma
+SYSLIBS= str.cma unix.cma num.cma
##############################################################################
# Generic variables
OCAMLOPT=ocamlopt$(OPTBIN) $(OPTFLAGS) $(INCLUDES)
OCAMLLEX=ocamllex$(OPTBIN) #-ml
OCAMLYACC=ocamlyacc -v
-OCAMLDEP=ocamldep$(OPTBIN) $(INCLUDES)
+OCAMLDEP=ocamldep$(OPTBIN) $(INCLUDESDEP)
OCAMLMKTOP=ocamlmktop -g -custom $(INCLUDES)
clean::
rm -f $(TARGET).top
-
-
lexer_c.ml: lexer_c.mll
$(OCAMLLEX) $<
clean::
wc -l ast_c.ml
wc -l parse_c.ml
+##############################################################################
+# Literate Programming rules
+##############################################################################
+
##############################################################################
# Generic rules
beforedepend::
+distclean::
+ rm -f .depend
+
depend:: beforedepend
$(OCAMLDEP) *.mli *.ml > .depend