SRC = fft2d.dsp
-INPUT = hcosine-32.csv
+IMGIN = hcosine-32.png
+LINES = 32
-all: clean fft2d
+BASENAME = output
+FORMAT = csv
+CSVIN = $(IMGIN:.png=.csv)
+CSVOUT = $(BASENAME)1.$(FORMAT)
+IMGOUT = $(SRC:.dsp=.png)
-fft2d: $(SRC) $(INPUT)
- faustine -d $(SRC) -i $(INPUT) --oformat csv
+all: $(IMGOUT)
+
+$(IMGOUT): $(CSVOUT)
+ octave -qf img_write.m
+
+$(CSVOUT): $(SRC) $(CSVIN)
+ faustine -f $(SRC) -i $(CSVIN) -l $(LINES) --oformat $(FORMAT) --obasename $(BASENAME)
+
+$(CSVIN): $(IMGIN)
+ octave -qf img_read.m
clean::
- rm -f gmon.out output*
+ rm -f gmon.out $(IMGOUT) $(BASENAME)*