summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrantišek Dvořák <valtri@civ.zcu.cz>2014-12-11 19:36:03 +0100
committerFrantišek Dvořák <valtri@civ.zcu.cz>2014-12-11 19:36:39 +0100
commitd4cf5d4513d37691b82833e95f0f4499ec77e057 (patch)
treecbb0487ca49e4bae6f5782460d450e0333207201
parent615f01659b2b413a64beff776e4ebb4ef6c805e2 (diff)
downloadcodecs-testing-mingw-d4cf5d4513d37691b82833e95f0f4499ec77e057.tar.gz
codecs-testing-mingw-d4cf5d4513d37691b82833e95f0f4499ec77e057.tar.xz
codecs-testing-mingw-d4cf5d4513d37691b82833e95f0f4499ec77e057.zip
Support for using utility.
-rw-r--r--Makefile4
-rwxr-xr-xcombiner/flac.pl12
-rwxr-xr-xcombiner/libmad.pl8
-rwxr-xr-xcombiner/libmad32.pl8
-rwxr-xr-xcombiner/speex.pl14
-rwxr-xr-xcombiner/wavpack.pl11
6 files changed, 47 insertions, 10 deletions
diff --git a/Makefile b/Makefile
index 07e705a..3fbfdc7 100644
--- a/Makefile
+++ b/Makefile
@@ -3,10 +3,12 @@ TARGETS=flac libmad libmad32 speex wavpack
all: $(TARGETS)
clean:
- for t in $(TARGETS); do rm -fv $${t}/$${t}.sh; done
+ for t in $(TARGETS); do rm -fv $${t}/$${t}.sh $${t}/$${t}-parallel.sh; done
$(TARGETS):
PERLLIB=$$PRERLLIB:combiner combiner/$@.pl > $@/$@.sh
chmod +x $@/$@.sh
+ PERLLIB=$$PRERLLIB:combiner combiner/$@.pl --parallel > $@/$@-parallel.sh
+ chmod +x $@/$@-parallel.sh
.PHONY: $(TARGETS)
diff --git a/combiner/flac.pl b/combiner/flac.pl
index a4fc025..7aaa928 100755
--- a/combiner/flac.pl
+++ b/combiner/flac.pl
@@ -32,6 +32,8 @@ my @combs = (
my @inits = (\&nop, \&init_w32, \&init_w64);
my @ends = (\&newline, \&newline, \&newline);
+my @inits_parallel = (\&parallel, \&parallel_w32, \&parallel_w64);
+my @ends_parallel = (\&end_parallel, \&end_parallel, \&end_parallel);
my @callbacks = (
sub($$) {
@@ -87,6 +89,10 @@ mkdir linux win32 win64
];
-combiners(\@inits, \@callbacks, \@combs);
-
-combiners(\@inits, \@callbacks_dec, \@combs);
+if ($ARGV[0] eq '--parallel') {
+ combiners(\@inits_parallel, \@ends_parallel, \@callbacks, \@combs);
+ combiners(\@inits_parallel, \@ends_parallel, \@callbacks_dec, \@combs);
+} else {
+ combiners(\@inits, \@ends, \@callbacks, \@combs);
+ combiners(\@inits, \@ends, \@callbacks_dec, \@combs);
+}
diff --git a/combiner/libmad.pl b/combiner/libmad.pl
index 54c1ddc..cb6abb8 100755
--- a/combiner/libmad.pl
+++ b/combiner/libmad.pl
@@ -21,6 +21,8 @@ my @combs = (
my @inits = (\&nop, \&init_w64);
my @ends = (\&newline, \&newline);
+my @inits_parallel = (\&parallel, \&parallel_w64);
+my @ends_parallel = (\&end_parallel, \&end_parallel);
my @callbacks = (
sub($$) {
@@ -41,7 +43,11 @@ mkdir linux win64
];
-combiners(\@inits, \@ends, \@callbacks, \@combs);
+if ($ARGV[0] eq '--parallel') {
+ combiners(\@inits_parallel, \@ends_parallel, \@callbacks, \@combs);
+} else {
+ combiners(\@inits, \@ends, \@callbacks, \@combs);
+}
print qq[
pushd linux
diff --git a/combiner/libmad32.pl b/combiner/libmad32.pl
index e1b1ae8..86eb345 100755
--- a/combiner/libmad32.pl
+++ b/combiner/libmad32.pl
@@ -21,6 +21,8 @@ my @combs = (
my @inits = (\&nop, \&init_w32);
my @ends = (\&newline, \&newline);
+my @inits_parallel = (\&parallel, \&parallel_w32);
+my @ends_parallel = (\&end_parallel, \&end_parallel);
my @callbacks = (
sub($$) {
@@ -41,7 +43,11 @@ mkdir linux32 win32
];
-combiners(\@inits, \@ends, \@callbacks, \@combs);
+if ($ARGV[0] eq '--parallel') {
+ combiners(\@inits_parallel, \@ends_parallel, \@callbacks, \@combs);
+} else {
+ combiners(\@inits, \@ends, \@callbacks, \@combs);
+}
print qq[
pushd linux32
diff --git a/combiner/speex.pl b/combiner/speex.pl
index 5f09476..9a93368 100755
--- a/combiner/speex.pl
+++ b/combiner/speex.pl
@@ -21,6 +21,8 @@ my @combs = (
my @inits = (\&nop, \&init_w64);
my @ends = (\&newline, \&newline);
+my @inits_parallel = (\&parallel, \&parallel_w64);
+my @ends_parallel = (\&end_parallel, \&end_parallel);
my @callbacks = (
sub($$) {
my ($name, $opts) = @_;
@@ -35,6 +37,9 @@ my @callbacks = (
);
my @inits_dec = (\&nop, \&init_w64, \&init_w64);
+my @ends_dec = (\&newline, \&newline, \&newline);
+my @inits_dec_parallel = (\&parallel, \&parallel_w64, \&parallel_w64);
+my @ends_dec_parallel = (\&end_parallel, \&end_parallel, \&end_parallel);
my @callbacks_dec = (
sub($$) {
my ($name, $opts) = @_;
@@ -60,5 +65,10 @@ mkdir linux win64 linux-win64
];
-combiners(\@inits, \@ends, \@callbacks, \@combs);
-combiners(\@inits_dec, \@ends, \@callbacks_dec, \@combs);
+if ($ARGV[0] eq '--parallel') {
+ combiners(\@inits_parallel, \@ends_parallel, \@callbacks, \@combs);
+ combiners(\@inits_dec_parallel, \@ends_dec_parallel, \@callbacks_dec, \@combs);
+} else {
+ combiners(\@inits, \@ends, \@callbacks, \@combs);
+ combiners(\@inits_dec, \@ends_dec, \@callbacks_dec, \@combs);
+}
diff --git a/combiner/wavpack.pl b/combiner/wavpack.pl
index 4b359c0..8a29f83 100755
--- a/combiner/wavpack.pl
+++ b/combiner/wavpack.pl
@@ -32,6 +32,8 @@ my @combs = (
my @inits = (\&nop, \&init_w32, \&init_w64);
my @ends = (\&newline, \&newline, \&newline);
+my @inits_parallel = (\&parallel, \&parallel_w32, \&parallel_w64);
+my @ends_parallel = (\&end_parallel, \&end_parallel, \&end_parallel);
my @callbacks = (
sub($$) {
@@ -76,5 +78,10 @@ mkdir linux win32 win64
];
-combiners(\@inits, \@ends, \@callbacks, \@combs);
-combiners(\@inits, \@ends, \@callbacks_dec, \@combs);
+if ($ARGV[0] eq '--parallel') {
+ combiners(\@inits_parallel, \@ends_parallel, \@callbacks, \@combs);
+ combiners(\@inits_parallel, \@ends_parallel, \@callbacks_dec, \@combs);
+} else {
+ combiners(\@inits, \@ends, \@callbacks, \@combs);
+ combiners(\@inits, \@ends, \@callbacks_dec, \@combs);
+}