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

blah-blah:out.txt plot.svg plot2.svg
	cat $<

plot2.svg:plot.data Makefile
	gnuplot -e "\
	set terminal svg background 'white'; \
	set key out; \
	plot '$<' using 1:4 with lines title 'mysin' \
	,'$<' using 1:5 with lines linewidth 4 dashtype (15,25) title 'math.h sin' \
	" > $@


plot.svg:plot.data Makefile
	gnuplot -e "\
	set terminal svg background 'white'; \
	set log y; \
	plot '$<' using 1:2 with lines title 'myexp' \
	,'$<' using 1:3 with lines dashtype (10,20) title 'math.h exp' \
	" > $@

out.txt plot.data:main input.matrix
	cat input.matrix | ./main 1> out.txt 2> plot.data

main:main.o myexp.o mysin.o

test:
	echo $(PATH)

clean:
	$(RM) main out.txt

INDENT_FLAGS = --linux-style
indent:
	for f in *.c; do indent $(INDENT_FLAGS) $$f; done
	rm -f *~
