NAME = hbugs_client METADIR = ../meta REQUIRES = lablgtk2 threads hbugs-common PREDICATES = glade init COMMONOPTS = -package "$(REQUIRES)" -predicates "$(PREDICATES)" OCAMLC = OCAMLPATH="$(METADIR)" ocamlfind ocamlc $(COMMONOPTS) OCAMLOPT = OCAMLPATH="$(METADIR)" ocamlfind ocamlopt $(COMMONOPTS) OCAMLFIND = ocamlfind DEPS = $(shell $(OCAMLFIND) query -recursive -predicates byte -format "%d/%a" $(REQUIRES)) DEPSOPT = $(shell $(OCAMLFIND) query -recursive -predicates native -format "%d/%a" $(REQUIRES)) all: byte world: byte opt byte: $(NAME) opt: $(NAME).opt hbugs_client_gui.ml: hbugs_gui.glade lablgladecc2 $< > $@.tmp mv $@.tmp $@ hbugs_client_gui.cmo: hbugs_client_gui.ml $(OCAMLC) -c $< hbugs_client_gui.cmx: hbugs_client_gui.ml $(OCAMLOPT) -c $< hbugs_client.cmi: hbugs_client.mli $(OCAMLC) -c $< hbugs_client.cmo: hbugs_client.ml hbugs_client.cmi $(OCAMLC) -thread -c $< hbugs_client.cmx: hbugs_client.ml hbugs_client.cmi $(OCAMLOPT) -thread -c $< $(NAME): $(DEPS) hbugs_client_gui.cmo $(NAME).cmo main.ml $(OCAMLC) -thread -package threads -linkpkg -o $@ hbugs_client_gui.cmo $(NAME).cmo main.ml $(NAME).opt: $(DEPSOPT) hbugs_client_gui.cmx $(NAME).cmx main.ml $(OCAMLOPT) -thread -package threads -linkpkg -o $@ hbugs_client_gui.cmx $(NAME).cmx main.ml clean: rm -f *.cm[aixo] *.cmxa *.[oa] $(NAME){,.opt} hbugs_client_gui.ml distclean: clean .PHONY: all world byte opt clean