]> matita.cs.unibo.it Git - helm.git/blob - helm/gTopLevel/Makefile
- script.sh added to the repository: you should change it to reflect your
[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 PREDICATES = "gnome,init,glade"
7 OCAMLOPTIONS = -package "$(REQUIRES)" -predicates "$(PREDICATES)" -pp camlp4o
8 OCAMLFIND = ocamlfind
9 OCAMLC = $(OCAMLFIND) ocamlc -thread $(OCAMLOPTIONS)
10 OCAMLOPT = $(OCAMLFIND) ocamlopt -thread $(OCAMLOPTIONS)
11 OCAMLDEP = ocamldep -pp camlp4o
12
13 LIBRARIES = $(shell ocamlfind query -recursive -predicates "byte $(PREDICATES)" -format "%d/%a" $(REQUIRES))
14 LIBRARIES_OPT = $(shell ocamlfind query -recursive -predicates "native $(PREDICATES)" -format "%d/%a" $(REQUIRES))
15
16 all: styles gTopLevel
17 opt: styles gTopLevel.opt
18
19 DEPOBJS = \
20         xml2Gdome.ml xml2Gdome.mli proofEngine.ml proofEngine.mli \
21         doubleTypeInference.ml doubleTypeInference.mli cic2acic.ml cic2acic.mli\
22         cic2Xml.ml cic2Xml.mli logicalOperations.ml logicalOperations.mli \
23         sequentPp.ml sequentPp.mli mQueryGenerator.mli mQueryLevels.ml \
24         mQueryLevels2.mli mQueryLevels2.ml mQueryGenerator.ml misc.ml misc.mli \
25         disambiguate.ml disambiguate.mli termEditor.ml termEditor.mli \
26         texTermEditor.ml texTermEditor.mli applyStylesheets.ml \
27         applyStylesheets.mli termViewer.ml termViewer.mli invokeTactics.ml \
28         invokeTactics.mli hbugs.ml hbugs.mli gTopLevel.ml
29
30 TOPLEVELOBJS = \
31         xml2Gdome.cmo doubleTypeInference.cmo cic2acic.cmo cic2Xml.cmo \
32         proofEngine.cmo logicalOperations.cmo sequentPp.cmo \
33         mQueryLevels2.cmo misc.cmo disambiguate.cmo \
34         termEditor.cmo texTermEditor.cmo applyStylesheets.cmo termViewer.cmo \
35         invokeTactics.cmo hbugs.cmo gTopLevel.cmo
36
37 styles:
38         @echo "***********************************************************************"
39         @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
40         @echo "***********************************************************************"
41         mkdir styles
42         (cd stylesheets && for i in *.xsl ; do ln -s ../stylesheets/$$i ../styles/$$i ; done)
43         (cd stylesheets/generated && for i in *.xsl ; do ln -s ../stylesheets/generated/$$i ../../styles/$$i ; done)
44         rm styles/rootcontent.xsl
45         ln -s ../rootcontent.xsl styles/rootcontent.xsl
46
47 depend:
48         $(OCAMLDEP) $(DEPOBJS) > .depend
49
50 gTopLevel: $(TOPLEVELOBJS) $(LIBRARIES)
51         $(OCAMLC) -linkpkg -o gTopLevel $(TOPLEVELOBJS)
52
53 gTopLevel.opt: $(TOPLEVELOBJS:.cmo=.cmx) $(LIBRARIES_OPT)
54         $(OCAMLOPT) -linkpkg -o gTopLevel.opt $(TOPLEVELOBJS:.cmo=.cmx)
55
56 .SUFFIXES: .ml .mli .cmo .cmi .cmx
57 .ml.cmo:
58         $(OCAMLC) -c $<
59 .mli.cmi:
60         $(OCAMLC) -c $<
61 .ml.cmx:
62         $(OCAMLOPT) -c $<
63
64 $(TOPLEVELOBJS): $(LIBRARIES)
65 $(TOPLEVELOBJS:.cmo=.cmx)): $(LIBRARIES_OPT)
66
67 clean:
68         rm -f *.cm[iox] *.o gTopLevel gTopLevel.opt
69
70 install:
71         cp gTopLevel gTopLevel.opt $(BIN_DIR)
72
73 uninstall:
74         rm -f $(BIN_DIR)/gTopLevel $(BIN_DIR)/gTopLevel.opt
75
76 .PHONY: install uninstall clean
77
78 ifneq ($(MAKECMDGOALS), depend)
79    include .depend   
80 endif