]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/software/components/binaries/transcript/Makefile
- Procedural: generation of "exact" is now complete
[helm.git] / helm / software / components / binaries / transcript / Makefile
index 1252d345fbb343659f6d37cb53a8280aa055e102..b3cc00a0c3a11c658a7c9f5846885dbd27d55705 100644 (file)
@@ -1,20 +1,29 @@
+include ../../../Makefile.defs
+
 H=@
 
 REQUIRES = unix str helm-grafite_parser
 
-MLS = types.ml v8Parser.ml v8Lexer.ml grafite.ml engine.ml top.ml
-MLIS = v8Parser.mli grafite.mli engine.mli
-CLEAN = v8Parser.ml v8Parser.mli v8Lexer.ml
+MLS = types.ml options.ml \
+      gallina8Parser.ml gallina8Lexer.ml \
+      grafiteParser.ml grafiteLexer.ml \
+      grafite.ml engine.ml top.ml
+MLIS = gallina8Parser.mli grafiteParser.mli grafite.mli engine.mli
+CLEAN = gallina8Parser.ml gallina8Parser.mli gallina8Lexer.ml \
+        grafiteParser.ml grafiteParser.mli grafiteLexer.ml
 
 PACKAGES = CoRN
 
+LIBRARIES = $(shell $(OCAMLFIND) query -recursive -predicates "byte $(PREDICATES)" -format "%d/%a" $(REQUIRES))
+LIBRARIES_OPT = $(shell $(OCAMLFIND) query -recursive -predicates "native $(PREDICATES)" -format "%d/%a" $(REQUIRES))
+
 CMOS = $(MLS:%.ml=%.cmo)
 CMXS = $(MLS:%.ml=%.cmx)
 CMIS = $(MLIS:%.mli=%.cmi)
 EXTRAS =
 
-OCAMLC = $(OCAMLFIND) ocamlc -thread -package "$(REQUIRES)" -linkpkg
-OCAMLOPT = $(OCAMLFIND) ocamlopt -thread -package "$(REQUIRES)" -linkpkg
+OCAMLC = $(OCAMLFIND) ocamlc -thread -package "$(REQUIRES)" -linkpkg -rectypes
+OCAMLOPT = $(OCAMLFIND) ocamlopt -thread -package "$(REQUIRES)" -linkpkg -rectypes
 OCAMLDEP = $(OCAMLFIND) ocamldep
 OCAMLYACC = ocamlyacc
 OCAMLLEX = ocamllex
@@ -23,13 +32,13 @@ all: transcript .depend
        @echo -n
 
 opt: transcript.opt $(EXTRAS) .depend.opt
-       #echo -n
+       @echo -n
 
 transcript: $(CMIS) $(CMOS) $(EXTRAS) 
        @echo "  OCAMLC $(CMOS)"
        $(H)$(OCAMLC) -o $@ $(CMOS)
 
-transcript.opt: $(CMIS) $(CMXS) $(EXTRAS) 
+transcript.opt: $(CMIS) $(CMXS) $(EXTRAS)
        @echo "  OCAMLOPT $(CMXS)"
        $(H)$(OCAMLOPT) -o $@ $(CMXS)
 
@@ -62,13 +71,13 @@ depend: .depend
 
 depend.opt: .depend.opt 
 
-%.cmi: %.mli $(EXTRAS) 
+%.cmi: %.mli $(EXTRAS)
        @echo "  OCAMLC $<"
        $(H)$(OCAMLC) -c $<
-%.cmo %.cmi: %.ml $(EXTRAS) 
+%.cmo %.cmi: %.ml $(EXTRAS) $(LIBRARIES)
        @echo "  OCAMLC $<"
        $(H)$(OCAMLC) -c $<
-%.cmx: %.ml $(EXTRAS) 
+%.o %.cmx %.cmi: %.ml $(EXTRAS) $(LIBRARIES_OPT)
        @echo "  OCAMLOPT $<"
        $(H)$(OCAMLOPT) -c $<
 %.ml %.mli: %.mly $(EXTRAS) 
@@ -78,16 +87,22 @@ depend.opt: .depend.opt
        @echo "  OCAMLLEX $<"
        $(H)$(OCAMLLEX) $<
 
-include ../../../Makefile.defs
+ifeq ($(MAKECMDGOALS),)
+  include .depend   
+endif
+
+ifeq ($(MAKECMDGOALS), all)
+  include .depend   
+endif
 
 ifeq ($(MAKECMDGOALS), opt)
   include .depend.opt   
 endif
 
-ifeq ($(MAKECMDGOALS), all)
+ifeq ($(MAKECMDGOALS), test)
   include .depend   
 endif
 
-ifeq ($(MAKECMDGOALS),)
-  include .depend   
+ifeq ($(MAKECMDGOALS), test.opt)
+  include .depend.opt   
 endif