# HANSEI: OCaml library for direct probabilitic programming # # The library requires the caml-shift library, delimcc.cma and the # correspondent .mli files. See caml-shift.tar.gz. # Please adjust DELIMCC= below to point to the library. # # The typical command to use the OCaml top-level: # $ ocaml -I ../../Continuations/caml-shift/ \ # ../../Continuations/caml-shift/delimcc.cma # and then do #load "prob.cma";; # $Id$ DELIMCC=../../Continuations/caml-shift OCAMLC=ocamlc DELIMCCRUN=$(DELIMCC)/dlldelimcc.so $(DELIMCC)/delimcc.cmo DELIMCCINT=$(DELIMCC)/delimcc.cmi LIB=prob.cma .SUFFIXES: .ml .mli .cmo .cmi %.cmi: %.mli $(OCAMLC) -c -I $(DELIMCC) $< %.cmo: %.ml %.cmi $(OCAMLC) -c -I $(DELIMCC) $< .PHONY: lib lib: prob.cma prob.cma: pMap.cmo pMap.cmi ptypes.cmi inference.cmi inference.cmo \ probM.cmo probM.cmi $(OCAMLC) -a -o $@ $(filter-out %.cmi,$^) probM.cmo, probM.cmi : inference.cmi TESTS = test_exactInfM test_samplingM test_slazy \ test_music1 test_music1a test_nested \ paper_examples test: $(TESTS) clean:: rm -f *.cm[io] *.[oa] *~ *.aux *.vrb paper_examples: $(LIB) paper_examples.ml $(OCAMLC) -o $@ $(DELIMCCRUN) $(filter-out %.cmi,$^) ./$@ test_%: $(LIB) %.ml $(OCAMLC) -o $@ $(DELIMCCRUN) $(filter-out %.cmi,$^) ./$@ test_music2: $(LIB) music2.cmi music2.ml $(OCAMLC) -o $@ $(DELIMCCRUN) $(filter-out %.cmi,$^) /usr/bin/time -l ./$@ music2_app: $(LIB) music2.cmo music2.cmi music2_app.ml $(OCAMLC) -o $@ $(DELIMCCRUN) $(filter-out %.cmi,$^) test_exactN: probN.cmo probN.cmi exactInfN.ml $(OCAMLC) -o $@ $(DELIMCCRUN) $(filter-out %.cmi,$^) ./$@ test_sampleN: probN.cmo probN.cmi samplingN.ml $(OCAMLC) -o $@ $(DELIMCCRUN) $(filter-out %.cmi,$^) ./$@ clean:: rm -f $(TESTS) .SUFFIXES: .dvi .pdf .ps .tex .eps .jpg .png .bbl export BIBTEX := bibtex -min-crossrefs=9999 .tex.dvi: # rm -f $(patsubst %.dvi,%.aux,$@) texi2dvi -b $< # && killall -USR1 xdvi.bin .tex.pdf: texi2dvi -b --pdf $< .pdf.ps: pdftops $< $@