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