]> matita.cs.unibo.it Git - helm.git/blob - helm/gTopLevel/Makefile
package dependences calulation fixed
[helm.git] / helm / gTopLevel / Makefile
1 BIN_DIR = /usr/local/bin
2 REQUIRES = lablgtkmathview helm-cic_textual_parser helm-cic_proof_checking \
3            helm-xml gdome2-xslt helm-cic_unification helm-tactics helm-mathql \
4            helm-mathql_interpreter
5 PREDICATES = "gnome,init,glade"
6 OCAMLOPTIONS = -package "$(REQUIRES)" -predicates "$(PREDICATES)" -pp camlp4o
7 OCAMLDEPOPTIONS = $(shell ocamlfind query -recursive -predicates "$(PREDICATES)" -i-format $(REQUIRES))
8 OCAMLFIND = ocamlfind
9 OCAMLC = $(OCAMLFIND) ocamlc $(OCAMLOPTIONS)
10 OCAMLOPT = $(OCAMLFIND) ocamlopt $(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: gTopLevel
17 opt: 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         applyStylesheets.ml applyStylesheets.mli termViewer.ml \
27         termViewer.mli invokeTactics.ml invokeTactics.mli gTopLevel.ml
28
29 TOPLEVELOBJS = \
30         xml2Gdome.cmo proofEngine.cmo doubleTypeInference.cmo cic2acic.cmo \
31         cic2Xml.cmo logicalOperations.cmo sequentPp.cmo mQueryLevels.cmo \
32         mQueryLevels2.cmo mQueryGenerator.cmo misc.cmo disambiguate.cmo \
33         termEditor.cmo applyStylesheets.cmo termViewer.cmo invokeTactics.cmo \
34         gTopLevel.cmo
35
36 depend:
37         $(OCAMLDEP) $(OCAMLDEPOPTIONS) $(DEPOBJS) > .depend
38
39 gTopLevel: $(TOPLEVELOBJS) $(LIBRARIES)
40         $(OCAMLC) -linkpkg -o gTopLevel $(TOPLEVELOBJS)
41
42 gTopLevel.opt: $(TOPLEVELOBJS:.cmo=.cmx) $(LIBRARIES_OPT)
43         $(OCAMLOPT) -linkpkg -o gTopLevel.opt $(TOPLEVELOBJS:.cmo=.cmx)
44
45 .SUFFIXES: .ml .mli .cmo .cmi .cmx
46 .ml.cmo: $(LIBRARIES)
47         $(OCAMLC) -c $<
48 .mli.cmi: $(LIBRARIES)
49         $(OCAMLC) -c $<
50 .ml.cmx: $(LIBRARIES_OPT)
51         $(OCAMLOPT) -c $<
52
53 clean:
54         rm -f *.cm[iox] *.o gTopLevel gTopLevel.opt
55
56 install:
57         cp gTopLevel gTopLevel.opt $(BIN_DIR)
58
59 uninstall:
60         rm -f $(BIN_DIR)/gTopLevel $(BIN_DIR)/gTopLevel.opt
61
62 .PHONY: install uninstall clean
63
64 include .depend