]> matita.cs.unibo.it Git - helm.git/blob - helm/gTopLevel/Makefile
* Abst removed from the DTD
[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-mathql \
4            helm-mathql_interpreter
5 PREDICATES =
6 OCAMLOPTIONS = -package "$(REQUIRES)" -predicates "$(PREDICATES)" -pp camlp4o
7 OCAMLC = ocamlfind ocamlc $(OCAMLOPTIONS)
8 OCAMLOPT = ocamlfind ocamlopt $(OCAMLOPTIONS)
9 OCAMLDEP = ocamldep -pp camlp4o
10
11 LIBRARIES = $(shell ocamlfind query -recursive -predicates "byte $(PREDICATES)" -format "%d/%a" $(REQUIRES))
12 LIBRARIES_OPT = $(shell ocamlfind query -recursive -predicates "native $(PREDICATES)" -format "%d/%a" $(REQUIRES))
13
14 all: gTopLevel
15 opt: gTopLevel.opt
16
17 DEPOBJS = xml2Gdome.ml proofEngineReduction.ml proofEngine.ml \
18           doubleTypeInference.ml doubleTypeInference.mli cic2acic.ml \
19           cic2Xml.ml cic2acic.mli logicalOperations.ml sequentPp.ml \
20           mquery.mli mquery.ml gTopLevel.ml
21
22 TOPLEVELOBJS = xml2Gdome.cmo proofEngineReduction.cmo proofEngine.cmo \
23                doubleTypeInference.cmo cic2acic.cmo cic2Xml.cmo \
24                logicalOperations.cmo sequentPp.cmo mquery.cmo gTopLevel.cmo
25
26 depend:
27         $(OCAMLDEP) $(DEPOBJS) > .depend
28
29 gTopLevel: $(TOPLEVELOBJS) $(LIBRARIES)
30         $(OCAMLC) -linkpkg -o gTopLevel $(TOPLEVELOBJS)
31
32 gTopLevel.opt: $(TOPLEVELOBJS:.cmo=.cmx) $(LIBRARIES_OPT)
33         $(OCAMLOPT) -linkpkg -o gTopLevel.opt $(TOPLEVELOBJS:.cmo=.cmx)
34
35 .SUFFIXES: .ml .mli .cmo .cmi .cmx
36 .ml.cmo: $(LIBRARIES)
37         $(OCAMLC) -c $<
38 .mli.cmi: $(LIBRARIES)
39         $(OCAMLC) -c $<
40 .ml.cmx: $(LIBRARIES_OPT)
41         $(OCAMLOPT) -c $<
42
43 clean:
44         rm -f *.cm[iox] *.o gTopLevel gTopLevel.opt
45
46 install:
47         cp gTopLevel gTopLevel.opt $(BIN_DIR)
48
49 uninstall:
50         rm -f $(BIN_DIR)/gTopLevel $(BIN_DIR)/gTopLevel.opt
51
52 .PHONY: install uninstall clean
53
54 include .depend