Strata.png:out.txt Makefile
	echo '\
	set term png;\
	set out "$@";\
	set size ratio 1;\
	set pointsize 0.1;\
	set xlabel "x";\
	set ylabel "y";\
	set xtics 0.5;\
	set ytics 0.5;\
	set pointsize 0.1;\
	plot "$<" notitle with points;\
	'|gnuplot

out.txt:main.exe
	mono $< 1>$@ 2>log

main.exe:main.cs plainmc.cs strata.cs matlib.dll
	mcs $(filter %.cs,$^) $(addprefix -r:,$(filter %.dll,$^))

LIBDIR=$(HOME)/public_html/prog/matlib
LIBSRC=\
	$(LIBDIR)/matrix/vector.cs\
	$(LIBDIR)/matrix/matrix.cs\
	$(LIBDIR)/minimum/simplex.cs\
	$(LIBDIR)/minimum/qnewton.cs

matlib.dll: $(LIBSRC)
	mcs -target:library -out:$@ $^

clean:
	$(RM) *.exe *.dll [Oo]ut* [Ll]og* *.svg
