]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/uwobo/Makefile
moved uwobo sources to the root uwobo directory
[helm.git] / helm / uwobo / Makefile
diff --git a/helm/uwobo/Makefile b/helm/uwobo/Makefile
new file mode 100644 (file)
index 0000000..c586dba
--- /dev/null
@@ -0,0 +1,62 @@
+VERSION = 0.0.1
+DISTDIR = uwobo-$(VERSION)
+REQUIRES = http gdome2 gdome2-xslt pcre unix
+COMMONOPTS = -package "$(REQUIRES)" -pp camlp4o
+OCAMLFIND = ocamlfind
+OCAMLC = $(OCAMLFIND) ocamlc $(COMMONOPTS)
+OCAMLOPT = $(OCAMLFIND) ocamlopt $(COMMONOPTS)
+OCAMLDEP = $(OCAMLFIND) ocamldep $(COMMONOPTS)
+OCAMLDOC =     \
+       ocamldoc        \
+               $(shell $(OCAMLFIND) query -i-format http)      \
+               $(shell $(OCAMLFIND) query -i-format gdome2)    \
+               $(shell $(OCAMLFIND) query -i-format gdome2-xslt)       \
+               $(shell $(OCAMLFIND) query -i-format pcre)      \
+               $(shell $(OCAMLFIND) query -i-format unix)
+MODULES = uwobo_common uwobo_styles uwobo_logger uwobo_engine
+OBJS = $(patsubst %,%.cmo,$(MODULES))
+OBJSOPT = $(patsubst %,%.cmx,$(MODULES))
+
+all: byte
+byte: uwobo
+opt: uwobo.opt
+world: byte opt
+
+include .depend
+depend:
+       $(OCAMLDEP) *.ml *.mli > .depend
+
+%.cmi: %.mli
+       $(OCAMLC) -c $<
+%.cmo: %.ml %.cmi
+       $(OCAMLC) -c $<
+%.cmx: %.ml %.cmi
+       $(OCAMLOPT) -c $<
+uwobo.cmo: uwobo.ml
+       $(OCAMLC) -c $<
+uwobo.cmx: uwobo.ml
+       $(OCAMLOPT) -c $<
+uwobo: $(OBJS) uwobo.ml
+       $(OCAMLC) -linkpkg -o $@ $^
+uwobo.opt: $(OBJSOPT) uwobo.ml
+       $(OCAMLOPT) -linkpkg -o $@ $^
+
+uwobo.dot: *.ml *.mli
+       $(OCAMLDOC) -dot -o $@ $^
+
+distclean: clean
+clean:
+       rm -f *.cm[aiox] *.o uwobo{,.opt,.dot}
+dist: distclean depend
+       mkdir $(DISTDIR)/
+       cp      \
+               $(patsubst %, %.ml, $(MODULES)) \
+               $(patsubst %, %.mli, $(MODULES))        \
+               uwobo.ml        \
+               Makefile .depend        \
+               $(DISTDIR)/
+       tar cvzf $(DISTDIR).tar.gz $(DISTDIR)/
+       rm -rf $(DISTDIR)/
+
+.PHONY: all byte opt world depend clean
+