]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/matita/Makefile.in
snapshot, notably:
[helm.git] / helm / matita / Makefile.in
index a9ea5d40c201138a240bf900833c92ebb0c2d04e..3d76d0d852a9a16eaf6b61eb2fbf16021238c9e3 100644 (file)
@@ -3,15 +3,19 @@ OCAMLFIND = @OCAMLFIND@
 CAMLP4O = @CAMLP4O@
 LABLGLADECC = @LABLGLADECC@
 REQUIRES = @FINDLIB_REQUIRES@
+CREQUIRES = @FINDLIB_CREQUIRES@
 HAVE_OCAMLOPT = @HAVE_OCAMLOPT@
 
-OCAML_FLAGS = -package "$(REQUIRES)" -pp $(CAMLP4O)
+OCAML_FLAGS = -pp $(CAMLP4O)
+PKGS = -package "$(REQUIRES)"
+CPKGS = -package "$(CREQUIRES)"
 OCAML_THREADS_FLAGS = -thread
 OCAML_DEBUG_FLAGS = -g
 OCAMLC_FLAGS = $(OCAML_FLAGS) $(OCAML_THREADS_FLAGS) $(OCAML_DEBUG_FLAGS)
 OCAMLC = $(OCAMLFIND) ocamlc $(OCAMLC_FLAGS)
 OCAMLOPT = $(OCAMLFIND) opt $(OCAMLC_FLAGS)
 OCAMLDEP = $(OCAMLFIND) ocamldep $(OCAML_FLAGS)
+# objects for matita (GTK GUI)
 CMOS =                         \
        buildTimeConf.cmo       \
        matitaMisc.cmo          \
@@ -25,38 +29,54 @@ CMOS =                              \
        matitaDisambiguator.cmo \
        matitaMathView.cmo      \
        matitaInterpreter.cmo
+# objects for matitac (batch compiler)
+CCMOS =                                \
+       buildTimeConf.cmo       \
+       matitaMisc.cmo          \
+       matitaTypes.cmo         \
+       matitaCicMisc.cmo       \
+       matitaProof.cmo         \
+       matitaDisambiguator.cmo \
+       matitaInterpreter.cmo
 
 LIB_DEPS = $(shell $(OCAMLFIND) query -recursive -predicates "byte" -format "%d/%a" $(REQUIRES))
 
-all: matita
+all: matita matitac
 
 ifeq ($(HAVE_OCAMLOPT),yes)
 CMXS = $(patsubst %.cmo,%.cmx,$(CMOS))
+CCMXS = $(patsubst %.cmo,%.cmx,$(CCMOS))
 LIBX_DEPS = $(shell $(OCAMLFIND) query -recursive -predicates "native" -format "%d/%a" $(REQUIRES))
-opt: matita.opt
+opt: matita.opt matitac.opt
 else
 opt:
        @echo "Native code compilation is disabled"
 endif
 
 matita: $(LIB_DEPS) $(CMOS) matita.ml
-       $(OCAMLC) -linkpkg -o $@ $(CMOS) matita.ml
+       $(OCAMLC) $(PKGS) -linkpkg -o $@ $(CMOS) matita.ml
 matita.opt: $(LIBX_DEPS) $(CMXS) matita.ml
-       $(OCAMLOPT) -linkpkg -o $@ $(CMXS) matita.ml
+       $(OCAMLOPT) $(PKGS) -linkpkg -o $@ $(CMXS) matita.ml
+
+matitac: $(LIB_DEPS) $(CCMOS) matitac.ml
+       $(OCAMLC) $(CPKGS) -linkpkg -o $@ $(CCMOS) matitac.ml
+matitac.opt: $(LIBX_DEPS) $(CMXS) matitac.ml
+       $(OCAMLOPT) $(CPKGS) -linkpkg -o $@ $(CCMXS) matitac.ml
 
 matitaGeneratedGui.ml matitaGeneratedGui.mli: matita.glade
        $(LABLGLADECC) $< > matitaGeneratedGui.ml
        $(OCAMLC) -i matitaGeneratedGui.ml > matitaGeneratedGui.mli
 
 %.cmi: %.mli
-       $(OCAMLC) -c $<
+       $(OCAMLC) $(PKGS) -c $<
 %.cmo %.cmi: %.ml
-       $(OCAMLC) -c $<
+       $(OCAMLC) $(PKGS) -c $<
 %.cmx: %.ml
-       $(OCAMLOPT) -c $<
+       $(OCAMLOPT) $(PKGS) -c $<
 
 clean:
-       rm -rf *.cma *.cmo *.cmi *.cmx *.cmxa *.a *.o matita matita.opt
+       rm -rf *.cma *.cmo *.cmi *.cmx *.cmxa *.a *.o   \
+               matita matita.opt matitac matitac.opt
 distclean: clean
        rm -f matitaGeneratedGui.ml matitaGeneratedGui.mli
        rm -f config.log config.status Makefile buildTimeConf.ml