1#!/usr/local/bin/perl 2# 3# unix.pl - the standard unix makefile stuff. 4# 5 6$o='/'; 7$cp='/bin/cp'; 8$rm='/bin/rm -f'; --- 56 unchanged lines hidden (view full) --- 65 $ret.="$target: \$(${Name}OBJ)\n"; 66 $ret.="\t\$(RM) $target\n"; 67 $ret.="\t\$(MKLIB) $target \$(${Name}OBJ)\n"; 68 $ret.="\t\$(RANLIB) $target\n\n"; 69 } 70 71sub do_link_rule 72 { |
73 local($target,$files,$dep_libs,$libs)=@_; |
74 local($ret,$_); 75 76 $file =~ s/\//$o/g if $o ne '/'; 77 $n=&bname($target); 78 $ret.="$target: $files $dep_libs\n"; |
79 $ret.="\t\$(LINK) ${efile}$target \$(LFLAGS) $files $libs\n\n"; |
80 return($ret); 81 } 82 83sub which 84 { 85 my ($name)=@_; 86 my $path; 87 foreach $path (split /:/, $ENV{PATH}) 88 { 89 if (-x "$path/$name") 90 { 91 return "$path/$name"; 92 } 93 } 94 } 95 961; |