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
6 ifeq ($(origin OCAMLPATH), undefined)
7 OCAMLFIND = OCAMLPATH=../../components/METAS ocamlfind
11 OCAMLC = $(OCAMLFIND) ocamlc $(COMMONOPTS)
12 OCAMLOPT = $(OCAMLFIND) ocamlopt $(COMMONOPTS)
13 OCAMLDEP = $(OCAMLFIND) ocamldep $(COMMONOPTS)
16 $(shell $(OCAMLFIND) query -i-format http) \
17 $(shell $(OCAMLFIND) query -i-format gdome2) \
18 $(shell $(OCAMLFIND) query -i-format gdome2-xslt) \
19 $(shell $(OCAMLFIND) query -i-format pcre) \
20 $(shell $(OCAMLFIND) query -i-format unix)
21 MODULES = uwobo_common uwobo_styles uwobo_profiles uwobo_logger uwobo_engine
22 OBJS = $(patsubst %,%.cmo,$(MODULES))
23 OBJSOPT = $(patsubst %,%.cmx,$(MODULES))
32 $(OCAMLDEP) *.ml *.mli > .depend
44 uwobo: $(OBJS) uwobo.ml
45 $(OCAMLC) -linkpkg -o $@ $^
46 uwobo.opt: $(OBJSOPT) uwobo.ml
47 $(OCAMLOPT) -linkpkg -o $@ $^
50 $(OCAMLDOC) -dot -o $@ $^
54 rm -f *.cm[aiox] *.o uwobo{,.opt,.dot}
55 dist: distclean depend
58 $(patsubst %, %.ml, $(MODULES)) \
59 $(patsubst %, %.mli, $(MODULES)) \
63 tar cvzf $(DISTTARBALL) $(DISTDIR)/
65 distcheck: $(DISTTARBALL)
66 if [ -d $(DISTDIR) ]; then rm -rf $(DISTDIR); else true; fi
71 .PHONY: all dist distclean distcheck byte opt world depend clean