]> matita.cs.unibo.it Git - helm.git/blob - helm/gTopLevel/Makefile
- added dependencies on hbugs-client, threads, helm-mquery_generator
[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 helm-mquery_generator threads hbugs-client
5 PREDICATES = "gnome,init,glade"
6 OCAMLOPTIONS = -package "$(REQUIRES)" -predicates "$(PREDICATES)" -pp camlp4o
7 OCAMLFIND = ocamlfind
8 OCAMLC = $(OCAMLFIND) ocamlc -thread $(OCAMLOPTIONS)
9 OCAMLOPT = $(OCAMLFIND) ocamlopt -thread $(OCAMLOPTIONS)
10 OCAMLDEP = ocamldep -pp camlp4o
11
12 LIBRARIES = $(shell ocamlfind query -recursive -predicates "byte $(PREDICATES)" -format "%d/%a" $(REQUIRES))
13 LIBRARIES_OPT = $(shell ocamlfind query -recursive -predicates "native $(PREDICATES)" -format "%d/%a" $(REQUIRES))
14
15 all: gTopLevel
16 opt: gTopLevel.opt
17
18 DEPOBJS = \
19         xml2Gdome.ml xml2Gdome.mli proofEngine.ml proofEngine.mli \
20         doubleTypeInference.ml doubleTypeInference.mli cic2acic.ml cic2acic.mli\
21         cic2Xml.ml cic2Xml.mli logicalOperations.ml logicalOperations.mli \
22         sequentPp.ml sequentPp.mli misc.ml misc.mli \
23         disambiguate.ml disambiguate.mli termEditor.ml termEditor.mli \
24         applyStylesheets.ml applyStylesheets.mli termViewer.ml \
25         termViewer.mli invokeTactics.ml invokeTactics.mli \
26         hbugs.ml hbugs.mli gTopLevel.ml
27
28 TOPLEVELOBJS = \
29         xml2Gdome.cmo doubleTypeInference.cmo cic2acic.cmo cic2Xml.cmo \
30         proofEngine.cmo logicalOperations.cmo sequentPp.cmo misc.cmo \
31         disambiguate.cmo termEditor.cmo applyStylesheets.cmo termViewer.cmo \
32         invokeTactics.cmo hbugs.cmo gTopLevel.cmo
33
34 depend:
35         $(OCAMLDEP) $(DEPOBJS) > .depend
36
37 gTopLevel: $(TOPLEVELOBJS) $(LIBRARIES)
38         $(OCAMLC) -linkpkg -o gTopLevel $(TOPLEVELOBJS)
39
40 gTopLevel.opt: $(TOPLEVELOBJS:.cmo=.cmx) $(LIBRARIES_OPT)
41         $(OCAMLOPT) -linkpkg -o gTopLevel.opt $(TOPLEVELOBJS:.cmo=.cmx)
42
43 .SUFFIXES: .ml .mli .cmo .cmi .cmx
44 .ml.cmo:
45         $(OCAMLC) -c $<
46 .mli.cmi:
47         $(OCAMLC) -c $<
48 .ml.cmx:
49         $(OCAMLOPT) -c $<
50
51 $(TOPLEVELOBJS): $(LIBRARIES)
52 $(TOPLEVELOBJS:.cmo=.cmx)): $(LIBRARIES_OPT)
53
54 clean:
55         rm -f *.cm[iox] *.o gTopLevel gTopLevel.opt
56
57 install:
58         cp gTopLevel gTopLevel.opt $(BIN_DIR)
59
60 uninstall:
61         rm -f $(BIN_DIR)/gTopLevel $(BIN_DIR)/gTopLevel.opt
62
63 .PHONY: install uninstall clean
64
65 ifneq ($(MAKECMDGOALS), depend)
66    include .depend   
67 endif