]> matita.cs.unibo.it Git - helm.git/blob - helm/metadata/create2/touch/Makefile
Modified Files:
[helm.git] / helm / metadata / create2 / touch / Makefile
1 REQUIRES = helm-getter helm-cic str
2 PREDICATES =
3 OCAMLOPTIONS = -package "$(REQUIRES)" -predicates "$(PREDICATES)"
4 OCAMLDEP = ocamldep
5 OCAMLFIND = ocamlfind
6 OCAMLC = $(OCAMLFIND) ocamlc $(OCAMLOPTIONS)
7 OCAMLOPT = $(OCAMLFIND) ocamlopt $(OCAMLOPTIONS)
8
9 LIBRARIES = $(shell ocamlfind query -recursive -predicates "byte $(PREDICATES)" -format "%d/%a" $(REQUIRES))
10 LIBRARIES_OPT = $(shell ocamlfind query -recursive -predicates "native $(PREDICATES)" -format "%d/%a" $(REQUIRES))
11
12 all: touch
13 opt: touch.opt
14
15 DEPOBJS = touch.ml
16
17 TOUCHOBJS = touch.cmo
18
19 depend:
20         $(OCAMLDEP) $(DEPOBJS) > .depend
21
22 touch: $(TOUCHOBJS) $(LIBRARIES)
23         $(OCAMLC) -linkpkg -o touch $(TOUCHOBJS)
24
25 touch.opt: $(TOUCHOBJS:.cmo=.cmx) $(LIBRARIES_OPT)
26         $(OCAMLOPT) -linkpkg -o touch.opt $(TOUCHOBJS:.cmo=.cmx)
27
28 .SUFFIXES: .ml .mli .cmo .cmi .cmx
29 .ml.cmo: $(LIBRARIES)
30         $(OCAMLC) -c $<
31 .mli.cmi: $(LIBRARIES)
32         $(OCAMLC) -c $<
33 .ml.cmx: $(LIBRARIES_OPT)
34         $(OCAMLOPT) -c $<
35
36 clean:
37         rm -f *.cm[iox] *.o touch touch.opt
38
39 .PHONY: clean
40
41 include .depend