X-Git-Url: http://matita.cs.unibo.it/gitweb/?p=helm.git;a=blobdiff_plain;f=components%2Fbinaries%2Ftranscript%2FMakefile;fp=components%2Fbinaries%2Ftranscript%2FMakefile;h=b9bfc6109e2ba69afa2472938ed4b31accf8ce36;hp=0000000000000000000000000000000000000000;hb=f61af501fb4608cc4fb062a0864c774e677f0d76;hpb=58ae1809c352e71e7b5530dc41e2bfc834e1aef1 diff --git a/components/binaries/transcript/Makefile b/components/binaries/transcript/Makefile new file mode 100644 index 000000000..b9bfc6109 --- /dev/null +++ b/components/binaries/transcript/Makefile @@ -0,0 +1,106 @@ +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 + +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 -rectypes +OCAMLOPT = $(OCAMLFIND) ocamlopt -thread -package "$(REQUIRES)" -linkpkg -rectypes +OCAMLDEP = $(OCAMLFIND) ocamldep +OCAMLYACC = ocamlyacc +OCAMLLEX = ocamllex + +all: transcript .depend + @echo -n + +opt: transcript.opt $(EXTRAS) .depend.opt + @echo -n + +transcript: $(CMIS) $(CMOS) $(EXTRAS) + @echo " OCAMLC $(CMOS)" + $(H)$(OCAMLC) -o $@ $(CMOS) + +transcript.opt: $(CMIS) $(CMXS) $(EXTRAS) + @echo " OCAMLOPT $(CMXS)" + $(H)$(OCAMLOPT) -o $@ $(CMXS) + +clean: + $(H)rm -f *.cm[iox] *.a *.o *.output + $(H)rm -f transcript transcript.opt $(CLEAN) + +.depend: $(MLIS) $(MLS) $(EXTRAS) + @echo " OCAMLDEP $(MLIS) $(MLS)" + $(H)$(OCAMLDEP) $(MLIS) $(MLS) > .depend + +.depend.opt: $(MLIS) $(MLS) $(EXTRAS) + @echo " OCAMLDEP -native $(MLIS) $(MLS)" + $(H)$(OCAMLDEP) -native $(MLIS) $(MLS) > .depend.opt + +test: transcript transcript.conf.xml $(PACKAGES:%=%.conf.xml) + @echo " TRANSCRIPT $(PACKAGES)" + $(H)$< $(PACKAGES) + +test.opt: transcript.opt transcript.conf.xml $(PACKAGES:%=%.conf.xml) + @echo " TRANSCRIPT.OPT $(PACKAGES)" + $(H)$< $(PACKAGES) + +export: clean + $(H)rm -f *~ + @echo " TAR transcript" + $(H)cd .. && tar --exclude=transcript/.svn -czf transcript.tgz transcript + +depend: .depend + +depend.opt: .depend.opt + +%.cmi: %.mli $(EXTRAS) + @echo " OCAMLC $<" + $(H)$(OCAMLC) -c $< +%.cmo %.cmi: %.ml $(EXTRAS) $(LIBRARIES) + @echo " OCAMLC $<" + $(H)$(OCAMLC) -c $< +%.cmx: %.ml $(EXTRAS) $(LIBRARIES_OPT) + @echo " OCAMLOPT $<" + $(H)$(OCAMLOPT) -c $< +%.ml %.mli: %.mly $(EXTRAS) + @echo " OCAMLYACC $<" + $(H)$(OCAMLYACC) -v $< +%.ml: %.mll $(EXTRAS) + @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), test) + include .depend +endif + +ifeq ($(MAKECMDGOALS), test.opt) + include .depend.opt +endif