2 DISTDIR = uwobo-$(VERSION)
3 DISTTARBALL = $(DISTDIR).tar.gz
4 REQUIRES = http gdome2 gdome2-xslt pcre unix helm-registry
5 COMMONOPTS = -package "$(REQUIRES)" -pp camlp4o
7 OCAMLC = $(OCAMLFIND) ocamlc $(COMMONOPTS)
8 OCAMLOPT = $(OCAMLFIND) ocamlopt $(COMMONOPTS)
9 OCAMLDEP = $(OCAMLFIND) ocamldep $(COMMONOPTS)
12 $(shell $(OCAMLFIND) query -i-format http) \
13 $(shell $(OCAMLFIND) query -i-format gdome2) \
14 $(shell $(OCAMLFIND) query -i-format gdome2-xslt) \
15 $(shell $(OCAMLFIND) query -i-format pcre) \
16 $(shell $(OCAMLFIND) query -i-format unix)
17 MODULES = uwobo_common uwobo_styles uwobo_profiles uwobo_logger uwobo_engine
18 OBJS = $(patsubst %,%.cmo,$(MODULES))
19 OBJSOPT = $(patsubst %,%.cmx,$(MODULES))
28 $(OCAMLDEP) *.ml *.mli > .depend
40 uwobo: $(OBJS) uwobo.ml
41 $(OCAMLC) -linkpkg -o $@ $^
42 uwobo.opt: $(OBJSOPT) uwobo.ml
43 $(OCAMLOPT) -linkpkg -o $@ $^
46 $(OCAMLDOC) -dot -o $@ $^
50 rm -f *.cm[aiox] *.o uwobo{,.opt,.dot}
51 dist: distclean depend
54 $(patsubst %, %.ml, $(MODULES)) \
55 $(patsubst %, %.mli, $(MODULES)) \
59 tar cvzf $(DISTTARBALL) $(DISTDIR)/
61 distcheck: $(DISTTARBALL)
62 if [ -d $(DISTDIR) ]; then rm -rf $(DISTDIR); else true; fi
67 .PHONY: all dist distclean distcheck byte opt world depend clean