mrproper: clean
@($(MAKE) -C $(SRC_DIR) mrproper)
@($(MAKE) -C $(PREPROCESSOR_DIR) clean)
+ @($(MAKE) -C $(EXAMPLES_DIR) clean)
test:
@$(MAKE) -C $(SINWAVE_DIR)
@echo "open $(SINWAVE_DIR)/output1.wav"
@echo "octave -q --eval 'plot(wavread(\"$(SINWAVE_DIR)/output1.wav\")); pause'"
+example:
+ @($(MAKE) -C $(EXAMPLES_DIR))
+
install :
mkdir -p $(prefix)/lib/faustine/
mkdir -p $(prefix)/bin/
-SOURCES = $(wildcard */*.dsp)
-DIRS = sinwave fft primitives # 2d_fft close fft open sinwave dilation erosion licenseplate primitives
+EXAMPLES = 2d_fft close dilation erosion fft open primitives sinwave #licenceplate
-all: make-each-example
+all: examples
-define mytarget
- make-each-example:: ; $(MAKE) -C $1
-endef
+examples::
+ @echo "Making all the examples, it may take several minutes..."
+ @$(foreach example, $(EXAMPLES), $(MAKE) -C $(example);)
-$(foreach dir,$(DIRS),$(eval $(call mytarget,$(dir))))
-
+clean::
+ @$(foreach example, $(EXAMPLES), $(MAKE) -C $(example) clean;)
-a = imread('circbw.png' );
+a = imread('circbw.gif' );
csvwrite('circbw.csv', a);
INPUT3 = sin_16536Hz_0.005_ampli_128samples.wav
INPUT4 = sin_22000Hz_0.005_ampli_128samples.wav
-all: clean fft
+BASENAME = output
+FORMAT = csv
+CSVOUT = $(BASENAME)1.$(FORMAT)
+IMGOUT = $(SRC:.dsp=.png)
-fft: $(SRC) $(INPUT1) $(INPUT2) $(INPUT3) $(INPUT4)
- faustine -d $(SRC) -i $(INPUT1) -i $(INPUT2) -i $(INPUT3) -i $(INPUT4)
+all: $(IMGOUT)
+
+$(IMGOUT): $(CSVOUT)
+ octave -qf img_write.m
+
+$(CSVOUT): $(SRC) $(INPUT1) $(INPUT2) $(INPUT3) $(INPUT4)
+ faustine -d $(SRC) -i $(INPUT1) -i $(INPUT2) -i $(INPUT3) -i $(INPUT4) --oformat $(FORMAT) --obasename $(BASENAME)
clean::
rm -f gmon.out output*
--- /dev/null
+a = csvread('output1.csv' );
+plot(a);
+print('fft.png');
+
-a = imread('circbw.png' );
+a = imread('circbw.gif' );
csvwrite('circbw.csv', a);
SRC = $(EXAMPLE).dsp
SAMPLES = 30
-all: clean $(EXAMPLE)
+BASENAME = output
+FORMAT = csv
+CSVOUT = $(BASENAME)1.$(FORMAT)
-$(EXAMPLE): $(SRC)
- faustine -d $(SRC) -t $(SAMPLES) --oformat csv
+all: $(CSVOUT)
+
+$(CSVOUT): $(SRC)
+ faustine -d $(SRC) -t $(SAMPLES) --oformat $(FORMAT) --obasename $(BASENAME)
clean::
rm -f gmon.out output*
-all: clean sin
+SRC = sin.dsp
-sin: sin.dsp
- faustine -d $<
+BASENAME = output
+FORMAT = wav
+WAVOUT = $(BASENAME)1.$(FORMAT)
+
+all: $(WAVOUT)
+
+$(WAVOUT): $(SRC)
+ faustine -d $< --obasename $(BASENAME) --oformat $(FORMAT)
clean::
- rm -f gmon.out output*
+ rm -f gmon.out $(BASENAME)*