1 ##############################################################################
3 ##############################################################################
5 -include ..
/Makefile.config
10 SRC
= flag_matcher.ml lib_engine.ml pretty_print_engine.ml \
11 check_exhaustive_pattern.ml \
12 check_reachability.ml \
13 c_vs_c.ml isomorphisms_c_c.ml \
14 cocci_vs_c.ml pattern_c.ml sgrep.ml transformation_c.ml \
15 asttomember.ml asttoctl2.ml ctltotex.ml \
16 postprocess_transinfo.ml ctlcocci_integration.ml
19 #SRC= flag_matcher.ml \
20 # c_vs_c.ml cocci_vs_c.ml \
22 # pattern_c.ml transformation_c.ml
24 #LIBS=../commons/commons.cma ../parsing_c/parsing_c.cma
25 #INCLUDES= -I ../commons -I ../parsing_c
26 INCLUDES
= -I ..
/commons
-I ..
/commons
/ocamlextra
-I ..
/globals \
27 -I ..
/ctl
-I ..
/parsing_cocci
-I ..
/parsing_c
28 LIBS
=..
/commons
/commons.cma ..
/globals
/globals.cma \
29 ..
/ctl
/ctl.cma ..
/parsing_c
/parsing_c.cma ..
/parsing_cocci
/cocci_parser.cma
31 SYSLIBS
= str.cma unix.cma
34 # just to test asttoctl
35 # CTLSOURCES = lib_engine.ml pretty_print_engine.ml asttoctl.ml ctltotex.ml \
38 ##############################################################################
40 ##############################################################################
43 #for profiling: -p -inline 0 with OCAMLOPT
44 OCAMLCFLAGS ?
= -g
-dtypes
46 OCAMLC
=ocamlc
$(OPTBIN
) $(OCAMLCFLAGS
) $(INCLUDES
)
47 OCAMLOPT
=ocamlopt
$(OPTBIN
) $(OPTFLAGS
) $(INCLUDES
)
48 OCAMLLEX
=ocamllex
$(OPTBIN
) #-ml
49 OCAMLYACC
=ocamlyacc
-v
50 OCAMLDEP
=ocamldep
$(OPTBIN
) $(INCLUDES
)
51 OCAMLMKTOP
=ocamlmktop
-g
-custom
$(INCLUDES
)
54 OBJS
= $(SRC
:.ml
=.cmo
)
55 OPTOBJS
= $(SRC
:.ml
=.cmx
)
58 ##############################################################################
60 ##############################################################################
62 all.opt
: $(TARGET
).cmxa
64 $(TARGET
).cma
: $(OBJS
)
65 $(OCAMLC
) -a
-o
$(TARGET
).cma
$(OBJS
)
67 $(TARGET
).cmxa
: $(OPTOBJS
) $(LIBS
:.cma
=.cmxa
)
68 $(OCAMLOPT
) -a
-o
$(TARGET
).cmxa
$(OPTOBJS
)
70 $(TARGET
).top
: $(OBJS
) $(LIBS
)
71 $(OCAMLMKTOP
) -o
$(TARGET
).top
$(SYSLIBS
) $(LIBS
) $(OBJS
)
78 ##############################################################################
80 ##############################################################################
82 ##############################################################################
84 ##############################################################################
86 .SUFFIXES
: .ml .mli .cmo .cmi .cmx
99 rm -f
*.cm
[ioxa
] *.o
*.a
*.cmxa
*.annot
100 rm -f
*~ .
*~ gmon.out
#*#
107 depend
:: beforedepend
108 $(OCAMLDEP
) *.mli
*.ml
> .depend