Cleaning the examples' Makefiles and octaves scripts.
[Faustine.git] / examples / dilation / Makefile
diff --git a/examples/dilation/Makefile b/examples/dilation/Makefile
new file mode 100644 (file)
index 0000000..43cdf34
--- /dev/null
@@ -0,0 +1,23 @@
+SRC = dilation.dsp
+IMGIN = letter_j.png
+LINES = 150
+
+BASENAME = output
+FORMAT = csv
+CSVIN = $(IMGIN:.png=.csv)
+CSVOUT = $(BASENAME)1.$(FORMAT)
+IMGOUT = $(SRC:.dsp=.png)
+
+all: $(IMGOUT)
+
+$(IMGOUT): $(CSVOUT)
+       octave -qf img_write.m
+
+$(CSVOUT): $(SRC) $(CSVIN)
+       faustine -d $(SRC) -i $(CSVIN) -t $(LINES) --oformat $(FORMAT) --obasename $(BASENAME)
+
+$(CSVIN): $(IMGIN)
+       octave -qf img_read.m
+
+clean::
+       rm -f gmon.out $(IMGOUT) $(BASENAME)* *csv