Release coccinelle-0.2.3rc2
[bpt/coccinelle.git] / parsing_c / Makefile
index 9850b55..3d720ba 100644 (file)
@@ -6,17 +6,34 @@
 ##############################################################################
 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 \
@@ -33,12 +50,14 @@ SRC= flag_parsing_c.ml parsing_stat.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
@@ -52,7 +71,7 @@ OCAMLC=ocamlc$(OPTBIN) $(OCAMLCFLAGS) $(INCLUDES)
 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)
 
 
@@ -78,8 +97,6 @@ $(TARGET).top: $(OBJS) $(LIBS)
 clean::
        rm -f $(TARGET).top
 
-
-
 lexer_c.ml: lexer_c.mll
        $(OCAMLLEX) $<
 clean::
@@ -120,6 +137,10 @@ locindiv:
        wc -l ast_c.ml
        wc -l parse_c.ml
 
+##############################################################################
+# Literate Programming rules
+##############################################################################
+
 
 ##############################################################################
 # Generic rules
@@ -146,6 +167,9 @@ distclean::
 
 beforedepend::
 
+distclean::
+       rm -f .depend
+
 depend:: beforedepend
        $(OCAMLDEP) *.mli *.ml    > .depend