# This Makefile must be included by another one defining: # $REQUIRES # $PREDICATES # $DEPOBJS # $OBJECTS # $PACKAGE # and put in a directory where there is a .depend file. BIN_DIR = /usr/local/bin OCAMLOPTIONS = -package "$(REQUIRES)" -predicates "$(PREDICATES)" OCAMLC = ocamlfind ocamlc $(OCAMLOPTIONS) OCAMLOPT = ocamlfind ocamlopt $(OCAMLOPTIONS) OCAMLDEP = ocamldep ARCHIVE = $(PACKAGE).cma ARCHIVE_OPT = $(PACKAGE).cmxa $(ARCHIVE): $(OBJECTS) $(OCAMLC) -a -o $@ $^ $(ARCHIVE_OPT): $(OBJECTS:.cmo=.cmx) $(OCAMLOPT) -a -o $@ $^ all: $(ARCHIVE) opt: $(ARCHIVE_OPT) depend: $(OCAMLDEP) $(DEPOBJS) > .depend .SUFFIXES: .ml .mli .cmo .cmi .cmx .ml.cmo: $(OCAMLC) -c $< .mli.cmi: $(OCAMLC) -c $< .ml.cmx: $(OCAMLOPT) -c $< clean: rm -f *.cm[ioax] *.cmxa *.o install: #cp uninstall: #rm -f .PHONY: all opt depend install uninstall clean include .depend