]> matita.cs.unibo.it Git - helm.git/blob - helm/software/components/binaries/transcript/Makefile
transcript updated
[helm.git] / helm / software / components / binaries / transcript / Makefile
1 H=@
2
3 REQUIRES = unix str helm-grafite_parser
4
5 MLS = types.ml v8Parser.ml v8Lexer.ml grafite.ml engine.ml top.ml
6 MLIS = v8Parser.mli grafite.mli engine.mli
7 CLEAN = v8Parser.ml v8Parser.mli v8Lexer.ml
8
9 PACKAGES = CoRN
10
11 CMOS = $(MLS:%.ml=%.cmo)
12 CMXS = $(MLS:%.ml=%.cmx)
13 CMIS = $(MLIS:%.mli=%.cmi)
14 EXTRAS =
15
16 OCAMLC = $(OCAMLFIND) ocamlc -thread -package "$(REQUIRES)" -linkpkg
17 OCAMLOPT = $(OCAMLFIND) ocamlopt -thread -package "$(REQUIRES)" -linkpkg
18 OCAMLDEP = $(OCAMLFIND) ocamldep
19 OCAMLYACC = ocamlyacc
20 OCAMLLEX = ocamllex
21
22 all: transcript .depend
23         @echo -n
24
25 opt: transcript.opt $(EXTRAS) .depend.opt
26         #echo -n
27
28 transcript: $(CMIS) $(CMOS) $(EXTRAS) 
29         @echo "  OCAMLC $(CMOS)"
30         $(H)$(OCAMLC) -o $@ $(CMOS)
31
32 transcript.opt: $(CMIS) $(CMXS) $(EXTRAS) 
33         @echo "  OCAMLOPT $(CMXS)"
34         $(H)$(OCAMLOPT) -o $@ $(CMXS)
35
36 clean:
37         $(H)rm -f *.cm[iox] *.a *.o *.output
38         $(H)rm -f transcript transcript.opt $(CLEAN)
39
40 .depend: $(MLIS) $(MLS) $(EXTRAS)
41         @echo "  OCAMLDEP $(MLIS) $(MLS)"
42         $(H)$(OCAMLDEP) $(MLIS) $(MLS) > .depend
43
44 .depend.opt: $(MLIS) $(MLS) $(EXTRAS)
45         @echo "  OCAMLDEP -native $(MLIS) $(MLS)"
46         $(H)$(OCAMLDEP) -native $(MLIS) $(MLS) > .depend.opt
47
48 test: transcript transcript.conf.xml $(PACKAGES:%=%.conf.xml) 
49         @echo "  TRANSCRIPT $(PACKAGES)" 
50         $(H)$< $(PACKAGES)
51
52 test.opt: transcript.opt transcript.conf.xml $(PACKAGES:%=%.conf.xml) 
53         @echo "  TRANSCRIPT.OPT $(PACKAGES)" 
54         $(H)$< $(PACKAGES)
55
56 export: clean
57         $(H)rm -f *~
58         @echo "  TAR transcript"
59         $(H)cd .. && tar --exclude=transcript/.svn -czf transcript.tgz transcript
60
61 depend: .depend 
62
63 depend.opt: .depend.opt 
64
65 %.cmi: %.mli $(EXTRAS) 
66         @echo "  OCAMLC $<"
67         $(H)$(OCAMLC) -c $<
68 %.cmo %.cmi: %.ml $(EXTRAS) 
69         @echo "  OCAMLC $<"
70         $(H)$(OCAMLC) -c $<
71 %.cmx: %.ml $(EXTRAS) 
72         @echo "  OCAMLOPT $<"
73         $(H)$(OCAMLOPT) -c $<
74 %.ml %.mli: %.mly $(EXTRAS) 
75         @echo "  OCAMLYACC $<"
76         $(H)$(OCAMLYACC) -v $<
77 %.ml: %.mll $(EXTRAS) 
78         @echo "  OCAMLLEX $<"
79         $(H)$(OCAMLLEX) $<
80
81 include ../../../Makefile.defs
82
83 ifeq ($(MAKECMDGOALS), opt)
84   include .depend.opt   
85 endif
86
87 ifeq ($(MAKECMDGOALS), all)
88   include .depend   
89 endif
90
91 ifeq ($(MAKECMDGOALS),)
92   include .depend   
93 endif