1. Sébastien Ferré
  2. ocaml-lib

Source

ocaml-lib / monad / makefile

OCAMLC=ocamlc
INCLUDES= -I ..               # all relevant -I options here
OCAMLFLAGS= $(INCLUDES)   # add other options for ocamlc here
OCAMLDOCFLAGS= -d doc $(INCLUDES)

# The list of object files
OBJ = logicMonad.cmo

all: logicMonad.cma pa_logicMonad.cmo
	echo

logicMonad.cma: $(OBJ)
	ocamlc $(OCAMLFLAGS) -a -o logicMonad.cma $(OBJ)
	ocamlopt $(OCAMLFLAGS) -a -o logicMonad.cmxa $(OBJ:.cmo=.cmx)

pa_logicMonad.cmo: pa_logicMonad.ml
	ocamlc -I +camlp4 camlp4lib.cma -pp camlp4orf -c pa_logicMonad.ml

# Common rules
.SUFFIXES: .ml .mli .cmo .cmi

%.cmo: %.ml
	ocamlc $(OCAMLFLAGS) -c $<
	ocamlopt $(OCAMLFLAGS) -c $<

%.exe: %.ml
	ocamlc -o $@ -pp "camlp4o -I . pa_logicMonad.cmo" str.cma logicMonad.cma $<

# Documentationg
html:
	ocamldoc $(OCAMLDOCFLAGS) -html $(ALL:.cmo=.ml)

# Clean up
clean:
	rm -f *.cm[ioax]
	rm -f *.cmxa
	rm -f *.[oa]