REQUIRES = helm-xml helm-pxp pcre pxp http
COMMONOPTS = -package "$(REQUIRES)" -pp camlp4o
OCAMLFIND = ocamlfind
-OCAMLC = $(OCAMLFIND) ocamlc $(COMMONOPTS)
-OCAMLOPT = $(OCAMLFIND) ocamlopt $(COMMONOPTS)
+OCAMLC = $(OCAMLFIND) ocamlc -thread $(COMMONOPTS)
+OCAMLOPT = $(OCAMLFIND) ocamlopt -thread $(COMMONOPTS)
OCAMLDEP = $(OCAMLFIND) ocamldep $(COMMONOPTS)
OCAMLDOC = \
ocamldoc \
OBJS = $(patsubst %,%.cmo,$(MODULES))
OBJSOPT = $(patsubst %,%.cmx,$(MODULES))
+DEPS = $(shell $(OCAMLFIND) query -recursive -predicates byte -format "%d/%a" $(REQUIRES))
+DEPSOPT = $(shell $(OCAMLFIND) query -recursive -predicates native -format "%d/%a" $(REQUIRES))
all: byte
byte: $(OBJS)
%.cmx: %.ml %.cmi
$(OCAMLOPT) -c $<
include Makefile.overrides
+$(OBJS): $(DEPS)
+$(OBJSOPT): $(DEPSOPT)
distclean: clean
clean: