projects
/
Faustine.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
dbded05
)
Examples' Makefiles are completed and tested.
author
WANG
<wang@wang-OptiPlex-780.(none)>
Mon, 16 Sep 2013 15:44:39 +0000
(17:44 +0200)
committer
WANG
<wang@wang-OptiPlex-780.(none)>
Mon, 16 Sep 2013 15:44:39 +0000
(17:44 +0200)
15 files changed:
Makefile
patch
|
blob
|
history
examples/Makefile
patch
|
blob
|
history
examples/close/img_read.m
patch
|
blob
|
history
examples/fft/Makefile
patch
|
blob
|
history
examples/fft/fft.png
[new file with mode: 0644]
patch
|
blob
examples/fft/img_write.m
[new file with mode: 0644]
patch
|
blob
examples/licenceplate/Makefile
[moved from
examples/licenseplate/Makefile
with 100% similarity]
patch
|
blob
|
history
examples/licenceplate/img_read.m
[moved from
examples/licenseplate/img_read.m
with 100% similarity]
patch
|
blob
|
history
examples/licenceplate/img_write.m
[moved from
examples/licenseplate/img_write.m
with 100% similarity]
patch
|
blob
|
history
examples/licenceplate/licence.png
[moved from
examples/licenseplate/licence.png
with 100% similarity]
patch
|
blob
|
history
examples/licenceplate/licence_small.png
[moved from
examples/licenseplate/licence_small.png
with 100% similarity]
patch
|
blob
|
history
examples/licenceplate/licenceplate.dsp
[moved from
examples/licenseplate/licenceplate.dsp
with 100% similarity]
patch
|
blob
|
history
examples/open/img_read.m
patch
|
blob
|
history
examples/primitives/Makefile
patch
|
blob
|
history
examples/sinwave/Makefile
patch
|
blob
|
history
diff --git
a/Makefile
b/Makefile
index
c558b8c
..
2743a33
100644
(file)
--- a/
Makefile
+++ b/
Makefile
@@
-33,6
+33,7
@@
clean:
mrproper: clean
@($(MAKE) -C $(SRC_DIR) mrproper)
@($(MAKE) -C $(PREPROCESSOR_DIR) clean)
mrproper: clean
@($(MAKE) -C $(SRC_DIR) mrproper)
@($(MAKE) -C $(PREPROCESSOR_DIR) clean)
+ @($(MAKE) -C $(EXAMPLES_DIR) clean)
test:
@$(MAKE) -C $(SINWAVE_DIR)
test:
@$(MAKE) -C $(SINWAVE_DIR)
@@
-43,6
+44,9
@@
test:
@echo "open $(SINWAVE_DIR)/output1.wav"
@echo "octave -q --eval 'plot(wavread(\"$(SINWAVE_DIR)/output1.wav\")); pause'"
@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/
install :
mkdir -p $(prefix)/lib/faustine/
mkdir -p $(prefix)/bin/
diff --git
a/examples/Makefile
b/examples/Makefile
index
66667e1
..
c7e43eb
100644
(file)
--- a/
examples/Makefile
+++ b/
examples/Makefile
@@
-1,4
+1,15
@@
-SOURCES = $(wildcard */*.dsp)
+#SOURCES = $(wildcard */*.dsp)
+#MAKEFILES = $(wildcard */Makefile)
+EXAMPLES = 2d_fft close dilation erosion fft licenceplate open primitives sinwave
-all: $(SOURCES)
-
+all: examples
+
+examples::
+ echo "Making all the examples, it may take several mins..."
+ @$(foreach example, $(EXAMPLES), cd $(example) && make && cd ..;)
+
+clean::
+ @$(foreach example, $(EXAMPLES), cd $(example) && make clean && cd ..;)
+
+#examples:
+# cd primitives && make
diff --git
a/examples/close/img_read.m
b/examples/close/img_read.m
index
1f1beae
..
941dbfa
100644
(file)
--- a/
examples/close/img_read.m
+++ b/
examples/close/img_read.m
@@
-1,2
+1,2
@@
-a = imread('circbw.
png
' );
+a = imread('circbw.
gif
' );
csvwrite('circbw.csv', a);
csvwrite('circbw.csv', a);
diff --git
a/examples/fft/Makefile
b/examples/fft/Makefile
index
fa1e89d
..
20aeaf3
100644
(file)
--- a/
examples/fft/Makefile
+++ b/
examples/fft/Makefile
@@
-4,10
+4,18
@@
INPUT2 = sin_2067Hz_0.005_ampli_128samples.wav
INPUT3 = sin_16536Hz_0.005_ampli_128samples.wav
INPUT4 = sin_22000Hz_0.005_ampli_128samples.wav
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*
clean::
rm -f gmon.out output*
diff --git a/examples/fft/fft.png
b/examples/fft/fft.png
new file mode 100644
(file)
index 0000000..
6e8739e
Binary files /dev/null and b/examples/fft/fft.png differ
diff --git a/examples/fft/img_write.m
b/examples/fft/img_write.m
new file mode 100644
(file)
index 0000000..
a359b40
--- /dev/null
+++ b/
examples/fft/img_write.m
@@ -0,0
+1,4
@@
+a = csvread('output1.csv' );
+plot(a);
+print('fft.png');
+
diff --git
a/examples/licenseplate/Makefile
b/examples/licenceplate/Makefile
similarity index 100%
rename from
examples/licenseplate/Makefile
rename to
examples/licenceplate/Makefile
diff --git
a/examples/licenseplate/img_read.m
b/examples/licenceplate/img_read.m
similarity index 100%
rename from
examples/licenseplate/img_read.m
rename to
examples/licenceplate/img_read.m
diff --git
a/examples/licenseplate/img_write.m
b/examples/licenceplate/img_write.m
similarity index 100%
rename from
examples/licenseplate/img_write.m
rename to
examples/licenceplate/img_write.m
diff --git
a/examples/licenseplate/licence.png
b/examples/licenceplate/licence.png
similarity index 100%
rename from
examples/licenseplate/licence.png
rename to
examples/licenceplate/licence.png
diff --git
a/examples/licenseplate/licence_small.png
b/examples/licenceplate/licence_small.png
similarity index 100%
rename from
examples/licenseplate/licence_small.png
rename to
examples/licenceplate/licence_small.png
diff --git
a/examples/licenseplate/licenceplate.dsp
b/examples/licenceplate/licenceplate.dsp
similarity index 100%
rename from
examples/licenseplate/licenceplate.dsp
rename to
examples/licenceplate/licenceplate.dsp
diff --git
a/examples/open/img_read.m
b/examples/open/img_read.m
index
1f1beae
..
941dbfa
100644
(file)
--- a/
examples/open/img_read.m
+++ b/
examples/open/img_read.m
@@
-1,2
+1,2
@@
-a = imread('circbw.
png
' );
+a = imread('circbw.
gif
' );
csvwrite('circbw.csv', a);
csvwrite('circbw.csv', a);
diff --git
a/examples/primitives/Makefile
b/examples/primitives/Makefile
index
80d4dbd
..
b392c2b
100644
(file)
--- a/
examples/primitives/Makefile
+++ b/
examples/primitives/Makefile
@@
-2,10
+2,14
@@
EXAMPLE = primitives
SRC = $(EXAMPLE).dsp
SAMPLES = 30
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*
clean::
rm -f gmon.out output*
diff --git
a/examples/sinwave/Makefile
b/examples/sinwave/Makefile
index
4a495a4
..
c6d2ec9
100644
(file)
--- a/
examples/sinwave/Makefile
+++ b/
examples/sinwave/Makefile
@@
-1,7
+1,13
@@
-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::
clean::
- rm -f gmon.out
output
*
+ rm -f gmon.out
$(BASENAME)
*