VERSION = 0.2.1 DISTDIR = uwobo-$(VERSION) DISTTARBALL = $(DISTDIR).tar.gz 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 $(DISTTARBALL) $(DISTDIR)/ rm -rf $(DISTDIR)/ distcheck: $(DISTTARBALL) if [ -d $(DISTDIR) ]; then rm -rf $(DISTDIR); else true; fi tar xvzf $< cd $(DISTDIR); make rm -rf $(DISTDIR) .PHONY: all dist distclean distcheck byte opt world depend clean