]> matita.cs.unibo.it Git - helm.git/blob - helm/gTopLevel/Makefile
d897036c03ecb9a7ae4f78d328f31896cc945e9e
[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 eta_fixing.ml eta_fixing.mli \
22         content2cic.ml content2cic.mli logicalOperations.ml \
23         logicalOperations.mli disambiguate.ml disambiguate.mli termEditor.ml \
24         termEditor.mli texTermEditor.ml texTermEditor.mli xmlDiff.ml \
25         xmlDiff.mli termViewer.ml termViewer.mli invokeTactics.ml \
26         invokeTactics.mli hbugs.ml hbugs.mli gTopLevel.ml
27
28 TOPLEVELOBJS = \
29              eta_fixing.cmo content2cic.cmo proofEngine.cmo logicalOperations.cmo \
30        disambiguate.cmo termEditor.cmo texTermEditor.cmo xmlDiff.cmo \
31        termViewer.cmo invokeTactics.cmo hbugs.cmo gTopLevel.cmo
32
33 styles:
34         @echo "***********************************************************************"
35         @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
36         @echo "***********************************************************************"
37         mkdir styles
38         (cd styles && for i in ../stylesheets/*.xsl ; do ln -s $$i; done)
39         (cd styles && for i in ../stylesheets/generated/*.xsl ; do ln -s $$i; done)
40         (cd styles && rm rootcontent.xsl && ln -s ../rootcontent.xsl)
41         
42 depend:
43         $(OCAMLDEP) $(DEPOBJS) > .depend
44
45 gTopLevel: $(TOPLEVELOBJS) $(LIBRARIES)
46         $(OCAMLC) -linkpkg -o gTopLevel $(TOPLEVELOBJS)
47
48 gTopLevel.opt: $(TOPLEVELOBJS:.cmo=.cmx) $(LIBRARIES_OPT)
49         $(OCAMLOPT) -linkpkg -o gTopLevel.opt $(TOPLEVELOBJS:.cmo=.cmx)
50
51 .SUFFIXES: .ml .mli .cmo .cmi .cmx
52 .ml.cmo:
53         $(OCAMLC) -c $<
54 .mli.cmi:
55         $(OCAMLC) -c $<
56 .ml.cmx:
57         $(OCAMLOPT) -c $<
58
59 $(TOPLEVELOBJS): $(LIBRARIES)
60 $(TOPLEVELOBJS:.cmo=.cmx)): $(LIBRARIES_OPT)
61
62 clean:
63         rm -f *.cm[iox] *.o gTopLevel gTopLevel.opt
64
65 install:
66         cp gTopLevel gTopLevel.opt $(BIN_DIR)
67
68 uninstall:
69         rm -f $(BIN_DIR)/gTopLevel $(BIN_DIR)/gTopLevel.opt
70
71 .PHONY: install uninstall clean
72
73 ifneq ($(MAKECMDGOALS), depend)
74    include .depend   
75 endif
76
77
78
79
80
81
82
83