]> matita.cs.unibo.it Git - helm.git/blob - helm/software/components/binaries/transcript/Makefile
transcript: very alpha version.
[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 opt: transcript.opt $(EXTRAS) .depend
25         #echo -n
26
27 transcript: $(CMIS) $(CMOS) $(EXTRAS) 
28         @echo "  OCAMLC $(CMOS)"
29         $(H)$(OCAMLC) -o $@ $(CMOS)
30
31 transcript.opt: $(CMIS) $(CMXS) $(EXTRAS) 
32         @echo "  OCAMLOPT $(CMXS)"
33         $(H)$(OCAMLOPT) -o $@ $(CMXS)
34
35 clean:
36         $(H)rm -f *.cm[iox] *.a *.o *.output
37         $(H)rm -f transcript transcript.opt $(CLEAN)
38
39 .depend: $(MLIS) $(MLS) $(EXTRAS)
40         @echo "  OCAMLDEP $(MLIS) $(MLS)"
41         $(H)$(OCAMLDEP) $(MLIS) $(MLS) > .depend
42
43 test: transcript transcript.conf.xml $(PACKAGES:%=%.conf.xml) 
44         @echo "  TRANSCRIPT $(PACKAGES)" 
45         $(H)$< $(PACKAGES)
46
47 test.opt: transcript.opt transcript.conf.xml $(PACKAGES:%=%.conf.xml) 
48         @echo "  TRANSCRIPT.OPT $(PACKAGES)" 
49         $(H)$< $(PACKAGES)
50
51 export: clean
52         $(H)rm -f *~
53         @echo "  TAR transcript"
54         $(H)cd .. && tar --exclude=transcript/.svn -czf transcript.tgz transcript
55
56 depend: .depend
57
58 %.cmi: %.mli $(EXTRAS) 
59         @echo "  OCAMLC $<"
60         $(H)$(OCAMLC) -c $<
61 %.cmo %.cmi: %.ml $(EXTRAS) 
62         @echo "  OCAMLC $<"
63         $(H)$(OCAMLC) -c $<
64 %.cmx: %.ml $(EXTRAS) 
65         @echo "  OCAMLOPT $<"
66         $(H)$(OCAMLOPT) -c $<
67 %.ml %.mli: %.mly $(EXTRAS) 
68         @echo "  OCAMLYACC $<"
69         $(H)$(OCAMLYACC) -v $<
70 %.ml: %.mll $(EXTRAS) 
71         @echo "  OCAMLLEX $<"
72         $(H)$(OCAMLLEX) $<
73
74 include ../../../Makefile.defs
75
76 ifeq ($(MAKECMDGOALS), all)
77   include .depend   
78 endif
79
80 ifeq ($(MAKECMDGOALS),)
81   include .depend   
82 endif