CFLAGS = -Wall -std=gnu1x $$(gsl-config --cflags)
LDLIBS = $$(gsl-config --libs)

plot.svg: plot.data Makefile
	gnuplot -e "\
	set term svg background rgb 'white';\
	plot '$<' using 1:2:3 with errorbars title 'exp'\
	, '$<' usin 1:4 with lines smooth acsplines title 'fit' ;\
	" > $@

plot.data:main
	./main $$(wc --lines higgs.data) < higgs.data 1>log 2>$@

clean:
	$(RM) main plot.data plot.svg log
