3 BEGIN { push @INC, '..'; }
8 $file =~ /(.*)\.cpp$/ or die "Cannot process $file";
13 open IN, '<', $file or die "Could not read $file: $!";
14 open OUT, '>', $out or die "Could not write $out: $!";
16 my $cc_deps = qx($ENV{CC} $ENV{FLAGS} -MM $file);
17 $cc_deps =~ s/.*?:\s*//;
19 my $ext = $file =~ m#(modules|commands)/# ? '.so' : '.o';
20 print OUT "$base$ext: $cc_deps";
21 print OUT "\t@../make/unit-cc.pl \$(VERBOSE) $file $base$ext\n";
22 print OUT "$base.d: $cc_deps";
23 print OUT "\t../make/calcdep.pl $file\n";