CFLAGS = -Wall -std=gnu11
LDLIBS = -lm

all:Out.samples.png

Out.samples.png:out.data Makefile
	echo '\
set term png ;\
set out "$@" ;\
set title "Stratified sampling of x*x+y*y<R*R?1:0" ;\
set xlabel "x" ;\
set ylabel "y" ;\
set size square ;\
plot \
 "$<" with points pointtype 7 pointsize 0.2 notitle \
	'|gnuplot

out.data:main
	./$< 1>Log 2>$@

main:main.o strata.o

clean:
	$(RM) main *.o [Oo]ut* [Ll]og*
