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