]> matita.cs.unibo.it Git - helm.git/blob - daemons/whelp/Makefile
This commit implements the Abort button for the GUI using a clever trick by Xavier...
[helm.git] / daemons / whelp / Makefile
1 REQUIRES = http helm-grafite_parser helm-logger helm-tactics helm-cic_disambiguation
2 OCAMLOPTIONS = -thread -package "$(REQUIRES)" -pp camlp4o
3 ifeq ($(origin OCAMLPATH), undefined)
4 OCAMLFIND = OCAMLPATH=../../components/METAS ocamlfind
5 else
6 OCAMLFIND = ocamlfind
7 endif
8 OCAMLC = $(OCAMLFIND) ocamlc $(OCAMLOPTIONS)
9 OCAMLOPT = $(OCAMLFIND) ocamlopt $(OCAMLOPTIONS)
10 OCAMLDEP = $(OCAMLFIND) ocamldep -package "$(REQUIRES)" -pp camlp4o
11
12 MODULES = mooglePp
13 SRCS = $(patsubst %,%.ml,$(MODULES)) $(patsubst %,%.mli,$(MODULES)) \
14        searchEngine.ml
15 CMOS = $(patsubst %,%.cmo,$(MODULES))
16 CMXS = $(patsubst %,%.cmx,$(MODULES))
17
18 all: byte html
19 world: byte opt
20 byte: searchEngine
21 opt: searchEngine.opt html
22
23 .PHONY: html
24 html:
25         make -C html/
26
27 %.cmi: %.mli
28         $(OCAMLC) -c $<
29 %.cmo %.cmi: %.ml
30         $(OCAMLC) -c $<
31 %.cmx: %.ml
32         $(OCAMLOPT) -c $<
33
34 searchEngine: $(CMOS) searchEngine.ml
35         $(OCAMLC) -linkpkg -o $@ $^
36 searchEngine.opt: $(CMXS) searchEngine.ml
37         $(OCAMLOPT) -linkpkg -o $@ $^
38
39 clean:
40         make -C html/ clean
41         rm -f *.cm[aiox] *.o searchEngine{,.opt}
42
43 .PHONY: depend
44 depend:
45         $(OCAMLDEP) $(SRCS) > .depend
46
47 .PHONY: all opt clean
48
49 include .depend
50