# Time-stamp: <modified the 27/01/2020 (at 22:40) by Erwan Jahier>

DIR=../../_build/install/default

sasa=$(DIR)/bin/sasa  -l 100
sasa=sasa

LIB=-package algo

.PRECIOUS: %.ml
%.ml: %.dot 
	sasa -reg $<

%.cmxs: %.ml
	ocamlfind ocamlopt $(LIB) -shared state.ml $(shell sasa -algo $*.dot) $< -o $@

%.cma: %.ml
	ocamlfind ocamlc -a $(LIB)  state.ml $(shell sasa -algo $*.dot) $< -o $@

%.lut: %.dot %.cmxs
	sasa -gld $< || echo "==> ok, I'll use the existing $@ file"

%_oracle.lus: %.dot %.cmxs
	sasa -glos $< || echo "==> ok, I'll use the existing $@ file"

%.rif: cmxs %.dot
	$(sasa) $(sasaopt) $*.dot -rif > $*.rif

%.pdf:
	osage -Tpdf $*.dot -o $*.pdf
	xpdf $*.pdf




g:gnuplot
s:sim2chrogtk

genclean:
	rm -f *.cmxs sasa *.cm* *.o *.pdf *.rif *.gp *.log *.dro *.seed *.c *.h sasa-*.dot
	rm -f rdbg-session*.ml luretteSession*.ml *.lut a.out *.cov
	rm -f *.exec *.sh
##################################################################################
-include Makefile.untracked