]> matita.cs.unibo.it Git - helm.git/blob - helm/ocaml/paramodulation/Makefile
some optimizations...
[helm.git] / helm / ocaml / paramodulation / Makefile
1 BIN_DIR = /usr/local/bin
2
3 TEST_REQUIRES = \
4         helm-registry \
5         helm-tactics \
6         helm-cic_transformations \
7         helm-cic_textual_parser2 
8
9 REQUIRES = $(TEST_REQUIRES)
10
11 OCAMLOPTIONS = \
12         -package "$(REQUIRES)" -predicates "$(PREDICATES)" #-pp camlp4o -thread
13 OCAMLFIND = ocamlfind
14 OCAMLDEBUGOPTIONS = -g
15 OCAMLC = $(OCAMLFIND) ocamlc $(OCAMLDEBUGOPTIONS) $(OCAMLOPTIONS)
16 OCAMLOPT = $(OCAMLFIND) ocamlopt $(OCAMLOPTIONS)
17 OCAMLDEP = $(OCAMLFIND) ocamldep #-pp camlp4o
18 OCAMLDEBUG = wowcamldebug
19
20 LIBRARIES = $(shell $(OCAMLFIND) query -recursive -predicates "byte $(PREDICATES)" -format "%d/%a" $(REQUIRES))
21 LIBRARIES_OPT = $(shell $(OCAMLFIND) query -recursive -predicates "native $(PREDICATES)" -format "%d/%a" $(REQUIRES))
22 TEST_LIBRARIES = $(shell $(OCAMLFIND) query -recursive -predicates "byte $(PREDICATES)" -format "%d/%a" $(TEST_REQUIRES))
23 TEST_LIBRARIES_OPT = $(shell $(OCAMLFIND) query -recursive -predicates "native $(PREDICATES)" -format "%d/%a" $(TEST_REQUIRES))
24
25 all: saturation
26 opt: saturation.opt
27
28 INTERFACE_FILES = \
29         utils.mli \
30         inference.mli
31
32 DEPOBJS = \
33         $(INTERFACE_FILES) $(INTERFACE_FILES:%.mli=%.ml) \
34         path_indexing.ml \
35         indexing.ml \
36         saturation.ml \
37         discrimination_tree.ml \
38         test_indexing.ml
39
40 TOPLEVELOBJS = $(INTERFACE_FILES:%.mli=%.cmo) \
41         path_indexing.cmo \
42         discrimination_tree.cmo \
43         indexing.cmo \
44         saturation.cmo
45 TESTOBJS = $(INTERFACE_FILES:%.mli=%.cmo) \
46         path_indexing.cmo \
47         discrimination_tree.cmo \
48         test_indexing.cmo
49 # REGTESTOBJS = $(TESTOBJS) regtest.cmo
50 # TESTLIBOBJS = $(TESTOBJS) testlibrary.cmo
51
52 $(INTERFACE_FILES:%.mli=%.cmo): $(LIBRARIES)
53 $(INTERFACE_FILES:%.mli=%.cmx): $(LIBRARIES_OPT)
54
55 depend:
56         $(OCAMLDEP) $(DEPOBJS) > .depend
57
58 saturation: $(TOPLEVELOBJS) $(LIBRARIES)
59         $(OCAMLC) -thread -linkpkg -o $@ $(TOPLEVELOBJS)
60 saturation.opt: $(TOPLEVELOBJS:.cmo=.cmx) $(LIBRARIES_OPT)
61         $(OCAMLOPT) -thread -linkpkg -o $@ $(TOPLEVELOBJS:.cmo=.cmx)
62
63 test_indexing: $(TESTOBJS) $(TEST_LIBRARIES)
64         $(OCAMLC) -linkpkg -o $@ $(TESTOBJS)
65
66 .SUFFIXES: .ml .mli .cmo .cmi .cmx
67 .ml.cmo:
68         $(OCAMLC) -c $<
69 .mli.cmi:
70         $(OCAMLC) -c $<
71 .ml.cmx:
72         $(OCAMLOPT) -c $<
73
74 $(TOPLEVELOBJS): $(LIBRARIES)
75 $(TOPLEVELOBJS:.cmo=.cmx)): $(LIBRARIES_OPT)
76
77 clean:
78         rm -f *.cm[iox] *.o saturation{,.opt} regtest{,.opt} testlibrary{,.opt}
79
80 ifneq ($(MAKECMDGOALS), depend)
81    include .depend   
82 endif
83