X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fhxp%2FMakefile;fp=helm%2Fhxp%2FMakefile;h=4c41e6598b2cf38c700c296f921232ab6aaef65c;hb=9e5ad471e2161436f4ff7ff56edce2947350d828;hp=0000000000000000000000000000000000000000;hpb=d8490ed760992a42639b784fc5036d775b199c3c;p=helm.git diff --git a/helm/hxp/Makefile b/helm/hxp/Makefile new file mode 100644 index 000000000..4c41e6598 --- /dev/null +++ b/helm/hxp/Makefile @@ -0,0 +1,66 @@ +BIN_DIR = /usr/local/bin +REQUIRES = zip +# unix helm-cic_textual_parser \ +# helm-mathql helm-mathql_interpreter helm-mathql_generator +PREDICATES = +OCAMLOPTIONS = -package "$(REQUIRES)" -predicates "$(PREDICATES)" +OCAMLC = ocamlfind ocamlc $(OCAMLOPTIONS) +OCAMLOPT = ocamlfind ocamlopt $(OCAMLOPTIONS) +OCAMLDEP = ocamldep +OCAMLYACC = ocamlyacc +OCAMLLEX = ocamllex + +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)) + +HXPTOP = hxpTop.ml + +DEPOBJS = $(HXPTOP) +AUXOBJS = hxpTypes.ml hxpParser.ml hxpParser.mli hxpLexer.ml hxpXML.ml + +all: hxp +opt: hxp.opt + +depend: $(AUXOBJS) + $(OCAMLDEP) $(DEPOBJS) $(AUXOBJS) > .depend + +hxp: hxpParser.cmi $(AUXOBJS:.ml=.cmo) $(HXPTOP:.ml=.cmo) $(LIBRARIES) + $(OCAMLC) -linkpkg -o hxp $(AUXOBJS:.ml=.cmo) $(HXPTOP:.ml=.cmo) + +hxp.opt: $(AUXOBJS:.ml=.cmx) $(HXPTOP:.ml=.cmx) $(LIBRARIES_OPT) + $(OCAMLOPT) -linkpkg -o hxp.opt $(AUXOBJS:.ml=.cmx) $(HXPTOP:.ml=.cmx) + +.SUFFIXES: .ml .mli .cmo .cmi .cmx .mly .mll +.ml.cmo: $(LIBRARIES) + $(OCAMLC) -c $< +.mli.cmi: $(LIBRARIES) + $(OCAMLC) -c $< +.ml.cmx: $(LIBRARIES_OPT) + $(OCAMLOPT) -c $< +.mly.ml: + $(OCAMLYACC) $< +.mly.mli: + $(OCAMLYACC) $< +.mll.ml: + $(OCAMLLEX) $< + +$(DEPOBJS:%.ml=%.cmo): $(LIBRARIES) +$(DEPOBJS:%.ml=%.cmx): $(LIBRARIES_OPT) + +clean: + rm -f *.cm[iox] *.o hxp hxp.opt \ + hxpParser.ml hxpParser.mli hxpLexer.ml + +install: + cp hxp hxp.opt $(BIN_DIR) + +uninstall: + cd $(BIN_DIR) + rm -f hxp hxp.opt + +.PHONY: install uninstall clean + +ifneq ($(MAKECMDGOALS), depend) + include .depend +endif +