4 my ($some_dir, $files)=@_;
5 opendir(DIR
, $some_dir) || die "can't opendir $some_dir: $!";
6 my @all = grep { /$files$/ && -f
"$some_dir/$_" } readdir(DIR
);
11 my @all=getdir
(".", "\.c");
12 my @pluginhead=getdir
("lib", "\.h");
18 my %head2lib=('Tremor' => 'libTremor');
21 foreach $s (sort @all) {
27 if($_ =~ /^ *\#include [\"<]([^\"]+)[\">]/) {
32 if($f =~ /codecs\/([^\
/]+)/) {
34 my $d = $head2lib{$codec};
42 #print "$s uses $plib and $codec\n";
45 printf("\$(OBJDIR)/$s.elf: \$(OBJDIR)/$s.o \$(LINKFILE)%s%s\n\t\$(ELFIT)\n\n",
46 $plib?
" \$(OBJDIR)/libplugin.a":"",
47 $codec?
" \$(OBJDIR)/$codec.a":"");