1 BIN_DIR = /usr/local/bin
2 REQUIRES = postgres http
4 OCAMLOPTIONS = -package "$(REQUIRES)" -predicates "$(PREDICATES)" -pp camlp4o
6 OCAMLC = $(OCAMLFIND) ocamlc -thread $(OCAMLOPTIONS)
7 OCAMLOPT = $(OCAMLFIND) ocamlopt -thread $(OCAMLOPTIONS)
8 OCAMLDEP = ocamldep -pp camlp4o
10 LIBRARIES = $(shell $(OCAMLFIND) query -recursive -predicates "byte $(PREDICATES)" -format "%d/%a" $(REQUIRES))
11 LIBRARIES_OPT = $(shell $(OCAMLFIND) query -recursive -predicates "native $(PREDICATES)" -format "%d/%a" $(REQUIRES))
15 rdfly: $(OBJS) $(LIBRARIES)
16 $(OCAMLC) -linkpkg -o $@ $(OBJS)
18 rdfly.opt: $(OBJS:.cmo=.cmx) $(LIBRARIES_OPT)
19 $(OCAMLOPT) -linkpkg -o rdfly.opt $(OBJS:.cmo=.cmx)
21 .SUFFIXES: .ml .mli .cmo .cmi .cmx
30 $(OBJS:.cmo=.cmx)): $(LIBRARIES_OPT)
33 rm -f *.cm[iox] *.o rdfly rdfly.opt
35 .PHONY: install uninstall clean