]> matita.cs.unibo.it Git - helm.git/blob - helm/gTopLevel/Makefile
Spurious files removed.
[helm.git] / helm / gTopLevel / Makefile
1 BIN_DIR = /usr/local/bin
2 REQUIRES = lablgtkmathview helm-cic_textual_parser helm-tex_cic_textual_parser \
3            helm-cic_proof_checking helm-xml gdome2-xslt helm-cic_unification \
4            helm-mathql helm-mathql_interpreter helm-mathql_generator \
5                  helm-tactics threads hbugs-client mathml-editor \
6            helm-cic_transformations
7 PREDICATES = "gnome,init,glade"
8 OCAMLOPTIONS = -package "$(REQUIRES)" -predicates "$(PREDICATES)" -pp camlp4o
9 OCAMLFIND = ocamlfind
10 OCAMLC = $(OCAMLFIND) ocamlc -thread $(OCAMLOPTIONS)
11 OCAMLOPT = $(OCAMLFIND) ocamlopt -thread $(OCAMLOPTIONS)
12 OCAMLDEP = ocamldep -pp camlp4o
13
14 LIBRARIES = $(shell $(OCAMLFIND) query -recursive -predicates "byte $(PREDICATES)" -format "%d/%a" $(REQUIRES))
15 LIBRARIES_OPT = $(shell $(OCAMLFIND) query -recursive -predicates "native $(PREDICATES)" -format "%d/%a" $(REQUIRES))
16
17 all: styles gTopLevel
18 opt: styles gTopLevel.opt
19
20 DEPOBJS = \
21         proofEngine.ml proofEngine.mli logicalOperations.ml \
22         logicalOperations.mli disambiguate.ml disambiguate.mli termEditor.ml \
23         termEditor.mli texTermEditor.ml texTermEditor.mli xmlDiff.ml \
24         xmlDiff.mli termViewer.ml termViewer.mli invokeTactics.ml \
25         invokeTactics.mli hbugs.ml hbugs.mli gTopLevel.ml
26
27 TOPLEVELOBJS = \
28              proofEngine.cmo logicalOperations.cmo \
29        disambiguate.cmo termEditor.cmo texTermEditor.cmo xmlDiff.cmo \
30        termViewer.cmo invokeTactics.cmo hbugs.cmo gTopLevel.cmo
31
32 styles:
33         @echo "***********************************************************************"
34         @if [ -d stylesheets -a -d meta_stylesheets ] ; then echo -e "* stylesheets and metastylesheets found:                              *\\n* I will create the request hyperlinks in styles                      *" ; else echo -e "* stylesheets or meta_stylesheets not found:                          *\\n* you should check-out the two directories from the MoWGLI repository *" ; exit -1 ; fi
35         @echo "***********************************************************************"
36         mkdir styles
37         (cd styles && for i in ../stylesheets/*.xsl ; do ln -s $$i; done)
38         (cd styles && for i in ../stylesheets/generated/*.xsl ; do ln -s $$i; done)
39         (cd styles && rm rootcontent.xsl && ln -s ../rootcontent.xsl)
40         
41 depend:
42         $(OCAMLDEP) $(DEPOBJS) > .depend
43
44 gTopLevel: $(TOPLEVELOBJS) $(LIBRARIES)
45         $(OCAMLC) -linkpkg -o gTopLevel $(TOPLEVELOBJS)
46
47 gTopLevel.opt: $(TOPLEVELOBJS:.cmo=.cmx) $(LIBRARIES_OPT)
48         $(OCAMLOPT) -linkpkg -o gTopLevel.opt $(TOPLEVELOBJS:.cmo=.cmx)
49
50 .SUFFIXES: .ml .mli .cmo .cmi .cmx
51 .ml.cmo:
52         $(OCAMLC) -c $<
53 .mli.cmi:
54         $(OCAMLC) -c $<
55 .ml.cmx:
56         $(OCAMLOPT) -c $<
57
58 $(TOPLEVELOBJS): $(LIBRARIES)
59 $(TOPLEVELOBJS:.cmo=.cmx)): $(LIBRARIES_OPT)
60
61 clean:
62         rm -f *.cm[iox] *.o gTopLevel gTopLevel.opt
63
64 install:
65         cp gTopLevel gTopLevel.opt $(BIN_DIR)
66
67 uninstall:
68         rm -f $(BIN_DIR)/gTopLevel $(BIN_DIR)/gTopLevel.opt
69
70 .PHONY: install uninstall clean
71
72 ifneq ($(MAKECMDGOALS), depend)
73    include .depend   
74 endif
75
76
77
78
79
80
81
82