]> matita.cs.unibo.it Git - helm.git/blob - helm/software/helena/Makefile.common
milestone update in basic_2
[helm.git] / helm / software / helena / Makefile.common
1 H=@
2 CALLMAKE = $(MAKE) --no-print-directory
3
4 OCAMLPATH ?= `readlink -f -n ./matita/components/METAS`
5 OCAMLFIND = OCAMLPATH=$(OCAMLPATH) ocamlfind
6
7 CAMLP = -pp \"camlp5o pa_macro.cmo $(CAMLPOPTIONS)\"
8
9 OCAMLDEP  = $(OCAMLFIND) ocamldep $(CAMLP)
10 OCAMLOPT  = $(OCAMLFIND) ocamlopt $(CAMLP) $(OCAMLOPTIONS) -linkpkg -package \"$(REQUIRES)\"
11 OCAMLC    = $(OCAMLFIND) ocamlc $(CAMLP) $(OCAMLOPTIONS) -linkpkg -package \"$(REQUIRES)\"
12 OCAMLYACC = ocamlyacc -v
13 OCAMLLEX  = ocamllex.opt
14
15 BUILDCMDS = -ocamldep "$(OCAMLDEP)" \
16             -ocamlc "$(OCAMLC)" \
17             -ocamlopt "$(OCAMLOPT)" \
18             -ocamlyacc "$(OCAMLYACC)" \
19             -ocamllex "$(OCAMLLEX)"
20
21 all: opt byte
22
23 opt:
24         @echo "  OCAMLBUILD $(EXEC).native"
25         $(H)ocamlbuild $(BUILDCMDS) $(BUILDOPTIONS) $(EXEC).native 
26
27 byte:
28         @echo "  OCAMLBUILD $(EXEC).byte"
29         $(H)ocamlbuild $(BUILDCMDS) $(BUILDOPTIONS) $(EXEC).byte 
30
31 clean:
32         @echo "  OCAMLBUILD -clean"
33 #       $(H)ocamlbuild -clean
34         $(H)$(RM) -r _build $(EXEC).native $(EXEC).byte
35         $(H)find -name "*~" | xargs $(RM) $(CLEAN)
36
37 .PHONY: all opt byte clean $(TARGETS)
38
39 #RELISE = $(EXEC:%=%_$(shell cat MakeVersion))
40 #
41 #DOWNDIR = ../../www/lambdadelta/download
42 #
43 #TAR       = tar -czf etc/$(EXEC:%=%.tgz)
44 #
45 #relise: clean
46 #       @echo "  RELISE $(RELISE)"
47 #       $(H)mkdir -p $(RELISE)
48 #       $(H)$(foreach FILE, $(shell cat Make), cp --parents $(FILE) $(RELISE);)
49 #       $(H)tar -czf etc/$(RELISE).tar.gz $(RELISE)
50 #       $(H)scp etc/$(RELISE).tar.gz $(DOWNDIR)
51 #
52 #tgz: clean
53 #       @echo "  TAR -czf $(EXEC:%=%.tgz) . $(DIRECTORIES)" 
54 #       $(H)find -name "Make*" | xargs $(TAR) $(KEEP)
55 #
56 #etc:
57 #       @echo "  MKDIR etc"
58 #       $(H)mkdir -p etc