2 OCAMLFIND = @OCAMLFIND@
4 LABLGLADECC = @LABLGLADECC@
5 REQUIRES = @FINDLIB_REQUIRES@
6 HAVE_OCAMLOPT = @HAVE_OCAMLOPT@
8 OCAML_FLAGS = -package "$(REQUIRES)" -pp $(CAMLP4O)
9 OCAML_THREADS_FLAGS = -thread
11 OCAMLC_FLAGS = $(OCAML_FLAGS) $(OCAML_THREADS_FLAGS) $(OCAML_DEBUG_FLAGS)
12 OCAMLC = $(OCAMLFIND) ocamlc $(OCAMLC_FLAGS)
13 OCAMLOPT = $(OCAMLFIND) opt $(OCAMLC_FLAGS)
14 OCAMLDEP = $(OCAMLFIND) ocamldep $(OCAML_FLAGS)
18 matitaGeneratedGui.cmo \
25 matitaDisambiguator.cmo \
29 LIB_DEPS = $(shell $(OCAMLFIND) query -recursive -predicates "byte" -format "%d/%a" $(REQUIRES))
33 ifeq ($(HAVE_OCAMLOPT),yes)
34 CMXS = $(patsubst %.cmo,%.cmx,$(CMOS))
35 LIBX_DEPS = $(shell $(OCAMLFIND) query -recursive -predicates "native" -format "%d/%a" $(REQUIRES))
39 @echo "Native code compilation is disabled"
42 matita: $(LIB_DEPS) $(CMOS) matita.ml
43 $(OCAMLC) -linkpkg -o $@ $(CMOS) matita.ml
44 matita.opt: $(LIBX_DEPS) $(CMXS) matita.ml
45 $(OCAMLOPT) -linkpkg -o $@ $(CMXS) matita.ml
47 matitaGeneratedGui.ml matitaGeneratedGui.mli: matita.glade
48 $(LABLGLADECC) $< > matitaGeneratedGui.ml
49 $(OCAMLC) -i matitaGeneratedGui.ml > matitaGeneratedGui.mli
59 rm -rf *.cma *.cmo *.cmi *.cmx *.cmxa *.a *.o matita matita.opt
61 rm -f matitaGeneratedGui.ml matitaGeneratedGui.mli
62 rm -f config.log config.status Makefile buildTimeConf.ml
63 rm -f matita.glade.bak matita.gladep.bak
64 rm -rf autom4te.cache/
66 depend: matitaGeneratedGui.ml matitaGeneratedGui.mli
67 $(OCAMLDEP) *.ml *.mli > .depend
71 .PHONY: all opt clean distclean depend