gendep.sh (207B)
1 #!/bin/sh 2 3 sed 's/\.o/.c/' ../obj.lst | 4 while read src 5 do 6 echo '#include "../src/'$src'"' > $src 7 done 8 9 (cat Makefile 10 echo 11 printf "OBJ =" 12 while read i 13 do 14 printf " %s" $i 15 done < ../obj.lst 16 echo) > makefile 17