SRC = dilation.dsp
IMGIN = letter_j.png
LINES = 150

CSVOUT = dilation.csv
CSVIN = $(IMGIN:.png=.csv)
IMGOUT = $(SRC:.dsp=.png)

all: $(IMGOUT)

$(IMGOUT): $(CSVOUT)
	octave -qf img_write.m

$(CSVOUT): $(SRC) $(CSVIN)
	faustine -f $(SRC) -l $(LINES) < $(CSVIN) 1> $@

$(CSVIN): $(IMGIN)
	octave -qf img_read.m

clean::
	rm -f gmon.out $(IMGOUT) $(CSVOUT)