- $objstr = &objects($p, "X.68k.o", undef, undef);
- print &splitline("$prog.68k \xc4 $objstr", undef, "\xb6"), "\n";
- print &splitline("\tILink -o {Targ} {LinkOptions_68K} " .
- $objstr . " {Libs_68K}", 69, "\xb6"), "\n\n";
-
- $objstr = &objects($p, "X.cfm68k.o", undef, undef);
- print &splitline("$prog.cfm68k \xc4 $objstr", undef, "\xb6"), "\n";
- print &splitline("\tILink -o {Targ} {LinkOptions_CFM68K} " .
- $objstr . " {Libs_CFM68K}", 69, "\xb6"), "\n\n";
+ $rsrc = &objects($p, "", "X.rsrc", undef);
+
+ foreach $arch (qw(68K CFM68K PPC Carbon)) {
+ $objstr = &objects($p, "X.\L$arch\E.o", "", undef);
+ print &splitline("$prog.\L$arch\E \xc4 $objstr $rsrc", undef, "\xb6");
+ print "\n";
+ print &splitline("\tDuplicate -y $rsrc {Targ}", 69, "\xb6"), "\n";
+ print &splitline("\t{Link_$arch} -o {Targ} -fragname $prog " .
+ "{LinkOptions_$arch} " .
+ $objstr . " {Libs_$arch}", 69, "\xb6"), "\n";
+ print &splitline("\tSetFile -a BMi {Targ}", 69, "\xb6"), "\n\n";
+ }