You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

15 lines
365 B

#!/usr/bin/perl -w
my $obj=$ARGV[0];
$obj=~s/\.[c|S]$/.o/;
system(qq(rm -f $obj));
open F,qq(make $ARGV[0] |);
my $cmd;
while(<F>){$cmd=$_;last if/gcc/;};
close F;
shift @ARGV;
print STDERR "$cmd\n";
system qq($cmd);
system qq(cp $obj /tmp/tmp.o;mipsel-linux-objdump -Slz /tmp/tmp.o >/tmp/tmp.S);
$cmd=~s/\s-c\s/ @ARGV -E -C /;
print STDERR "$cmd\n";
system($cmd);