]> matita.cs.unibo.it Git - helm.git/blob - helm/DEVEL/pxp/pxp/m2parsergen/Makefile
Initial revision
[helm.git] / helm / DEVEL / pxp / pxp / m2parsergen / Makefile
1 # make all:             make bytecode executable
2 # make clean:           remove intermediate files (in this directory)
3 # make CLEAN:           remove intermediate files (recursively)
4
5 #----------------------------------------------------------------------
6
7 SRC = ast.ml lexer.ml parser.ml generator.ml
8 OBJ = $(SRC:.ml=.cmo)
9
10 #----------------------------------------------------------------------
11
12
13 .PHONY: all
14 all: m2parsergen
15
16 .PHONY: clean
17 clean:
18         rm -f *.cmi *.cmo *.cma *.cmx *.o *.a *.cmxa lexer.ml parser.ml \
19               parser.mli
20
21 .PHONY: CLEAN
22 CLEAN: clean
23
24 .PHONY: distclean
25 distclean: clean
26         rm -f *~ depend depend.pkg m2parsergen a.out x.ml
27
28 #----------------------------------------------------------------------
29 # general rules:
30
31 OPTIONS   =
32 OCAMLC    = ocamlc -g $(OPTIONS) $(ROPTIONS)
33 OCAMLOPT  = ocamlopt -p $(OPTIONS) $(ROPTIONS)
34 OCAMLDEP  = ocamldep $(OPTIONS)
35 OCAMLFIND = ocamlfind
36
37 #----------------------------------------------------------------------
38
39 depend: $(SRC) 
40         $(OCAMLDEP) $(SRC) >depend
41
42 m2parsergen: $(OBJ)
43         $(OCAMLC) -o m2parsergen $(OBJ)
44
45 .SUFFIXES: .cmo .cmi .cmx .ml .mli .mll .mly
46
47 .ml.cmx:
48         $(OCAMLOPT) -c $<
49
50 .ml.cmo:
51         $(OCAMLC) -c $<
52
53 .mli.cmi:
54         $(OCAMLC) -c $<
55
56 .mll.ml:
57         ocamllex $<
58
59 .mly.ml:
60         ocamlyacc $<
61
62 include depend