3 # Makefile generator for PuTTY.
5 # Reads the file `Recipe' to determine the list of generated
6 # executables and their component objects. Then reads the source
7 # files to compute #include dependencies. Finally, writes out the
8 # various target Makefiles.
12 open IN
, "Recipe" or die "unable to open Recipe file\n";
14 @incdirs = ("", "unix/", "mac/");
16 $help = ""; # list of newline-free lines of help text
17 %programs = (); # maps prog name + type letter to listref of objects/resources
18 %groups = (); # maps group name to listref of objects/resources
21 # Skip comments (unless the comments belong, for example because
22 # they're part of the help text).
23 next if /^\s*#/ and !$in_help;
27 if ($_[0] eq "!begin" and $_[1] eq "help") { $in_help = 1; next; }
28 if ($_[0] eq "!end" and $in_help) { $in_help = 0; next; }
29 # If we're gathering help text, keep doing so.
30 if ($in_help) { $help .= "$_\n"; next; }
32 next if scalar @_ == 0;
34 # Now we have an ordinary line. See if it's an = line, a : line
39 $listref = $lastlistref;
41 die "$.: unexpected + line\n" if !defined $lastlistref;
42 } elsif ($_[1] eq "=") {
43 $groups{$_[0]} = [] if !defined $groups{$_[0]};
44 $listref = $groups{$_[0]};
46 shift @objs; # eat the group name
47 } elsif ($_[1] eq ":") {
50 shift @objs; # eat the program name
52 die "$.: unrecognised line type\n";
54 shift @objs; # eat the +, the = or the :
56 while (scalar @objs > 0) {
59 foreach $j (@
{$groups{$i}}) { unshift @objs, $j; }
60 } elsif (($i eq "[G]" or $i eq "[C]" or $i eq "[M]" or
61 $i eq "[X]" or $i eq "[U]") and defined $prog) {
62 $type = substr($i,1,1);
67 if ($prog and $type) {
68 die "multiple program entries for $prog [$type]\n"
69 if defined $programs{$prog . "," . $type};
70 $programs{$prog . "," . $type} = $listref;
72 $lastlistref = $listref;
77 # Now retrieve the complete list of objects and resource files, and
78 # construct dependency data for them. While we're here, expand the
79 # object list for each program, and complain if its type isn't set.
80 @prognames = sort keys %programs;
83 foreach $i (@prognames) {
84 ($prog, $type) = split ",", $i;
85 # Strip duplicate object names.
87 @list = grep { $status = ($prev ne $_); $prev=$_; $status }
88 sort @
{$programs{$i}};
89 $programs{$i} = [@list];
91 # Dependencies for "x" start with "x.c".
92 # Dependencies for "x.res" start with "x.rc".
93 # Dependencies for "x.rsrc" start with "x.r".
94 # Both types of file are pushed on the list of files to scan.
95 # Libraries (.lib) don't have dependencies at all.
96 if ($j =~ /^(.*)\.res$/) {
98 $depends{$j} = [$file];
99 push @scanlist, $file;
100 } elsif ($j =~ /^(.*)\.rsrc$/) {
102 $depends{$j} = [$file];
103 push @scanlist, $file;
104 } elsif ($j =~ /\.lib$/) {
105 # libraries don't have dependencies
108 $depends{$j} = [$file];
109 push @scanlist, $file;
114 # Scan each file on @scanlist and find further inclusions.
115 # Inclusions are given by lines of the form `#include "otherfile"'
116 # (system headers are automatically ignored by this because they'll
117 # be given in angle brackets). Files included by this method are
118 # added back on to @scanlist to be scanned in turn (if not already
121 # Resource scripts (.rc) can also include a file by means of a line
122 # ending `ICON "filename"'. Files included by this method are not
123 # added to @scanlist because they can never include further files.
125 # In this pass we write out a hash %further which maps a source
126 # file name into a listref containing further source file names.
129 while (scalar @scanlist > 0) {
130 $file = shift @scanlist;
131 next if defined $further{$file}; # skip if we've already done it
132 $resource = ($file =~ /\.rc$/ ?
1 : 0);
133 $further{$file} = [];
134 $dirfile = &findfile
($file);
135 open IN
, "$dirfile" or die "unable to open source file $file\n";
138 /^\s*#include\s+\"([^\"]+)\"/ and do {
139 push @
{$further{$file}}, $1;
143 /ICON\s+\"([^\"]+)\"\s*$/ and do {
144 push @
{$further{$file}}, $1;
151 # Now we're ready to generate the final dependencies section. For
152 # each key in %depends, we must expand the dependencies list by
153 # iteratively adding entries from %further.
154 foreach $i (keys %depends) {
156 @scanlist = @
{$depends{$i}};
157 foreach $i (@scanlist) { $dep{$i} = 1; }
158 while (scalar @scanlist > 0) {
159 $file = shift @scanlist;
160 foreach $j (@
{$further{$file}}) {
163 push @
{$depends{$i}}, $j;
168 # printf "%s: %s\n", $i, join ' ',@{$depends{$i}};
171 # Utility routines while writing out the Makefiles.
175 my $dir, $i, $outdir = "";
177 foreach $dir (@incdirs) {
178 $outdir = $dir, $i++ if -f
"$dir$name";
180 die "multiple instances of source file $name\n" if $i > 1;
181 return "$outdir$name";
185 my ($prog, $otmpl, $rtmpl, $ltmpl, $prefix, $dirsep) = @_;
189 foreach $i (@
{$programs{$prog}}) {
191 if ($i =~ /^(.*)\.(res|rsrc)/) {
193 ($x = $rtmpl) =~ s/X/$y/;
194 } elsif ($i =~ /^(.*)\.lib/) {
196 ($x = $ltmpl) =~ s/X/$y/;
198 ($x = $otmpl) =~ s/X/$i/;
200 push @ret, $x if $x ne "";
202 return join " ", @ret;
206 my ($line, $width, $splitchar) = @_;
208 $len = (defined $width ?
$width : 76);
209 $splitchar = (defined $splitchar ?
$splitchar : '\\');
210 while (length $line > $len) {
211 $line =~ /^(.{0,$len})\s(.*)$/ or $line =~ /^(.{$len,}?\s(.*)$/;
212 $result .= $1 . " ${splitchar}\n\t\t";
216 return $result . $line;
220 my ($otmpl, $rtmpl, $prefix, $dirsep, $depchar, $splitchar) = @_;
225 foreach $i (sort keys %depends) {
226 if ($i =~ /^(.*)\.(res|rsrc)/) {
227 next if !defined $rtmpl;
229 ($x = $rtmpl) =~ s/X/$y/;
231 ($x = $otmpl) =~ s/X/$i/;
233 @deps = @
{$depends{$i}};
239 push @ret, {obj
=> $x, deps
=> [@deps]};
246 my ($n, $prog, $type);
249 foreach $n (@prognames) {
250 ($prog, $type) = split ",", $n;
251 push @ret, $n if index($types, $type) >= 0;
258 my ($n, $prog, $type);
261 foreach $n (@prognames) {
262 ($prog, $type) = split ",", $n;
263 push @ret, $prog if index($types, $type) >= 0;
269 my ($types,$suffix) = @_;
271 # assume that all UNIX programs have a man page
272 if($suffix eq "1" && $types =~ /X/) {
273 return map("$_.1", &progrealnames
($types));
278 # Now we're ready to output the actual Makefiles.
281 open OUT
, ">Makefile.cyg"; select OUT
;
283 "# Makefile for PuTTY under cygwin.\n".
284 "#\n# This file was created by `mkfiles.pl' from the `Recipe' file.\n".
285 "# DO NOT EDIT THIS FILE DIRECTLY; edit Recipe or mkfiles.pl instead.\n";
286 # gcc command line option is -D not /D
287 ($_ = $help) =~ s/=\/D/=-D
/gs
;
291 "# You can define this path to point at your tools if you need to\n".
292 "# TOOLPATH = c:\\cygwin\\bin\\ # or similar, if you're running Windows\n".
293 "# TOOLPATH = /pkg/mingw32msvc/i386-mingw32msvc/bin/\n".
294 "CC = \$(TOOLPATH)gcc\n".
295 "RC = \$(TOOLPATH)windres\n".
296 "# You may also need to tell windres where to find include files:\n".
297 "# RCINC = --include-dir c:\\cygwin\\include\\\n".
299 &splitline
("CFLAGS = -mno-cygwin -Wall -O2 -D_WINDOWS -DDEBUG -DWIN32S_COMPAT".
300 " -DNO_SECURITY -D_NO_OLDNAMES -DNO_MULTIMON -I.")."\n".
301 "LDFLAGS = -mno-cygwin -s\n".
302 &splitline
("RCFLAGS = \$(RCINC) --define WIN32=1 --define _WIN32=1".
303 " --define WINVER=0x0400 --define MINGW32_FIX=1")."\n".
308 "\t\$(CC) \$(COMPAT) \$(FWHACK) \$(XFLAGS) \$(CFLAGS) -c \$<\n".
311 "\t\$(RC) \$(FWHACK) \$(RCFL) \$(RCFLAGS) \$< \$\@\n".
313 print &splitline
("all:" . join "", map { " $_.exe" } &progrealnames
("GC"));
315 foreach $p (&prognames
("GC")) {
316 ($prog, $type) = split ",", $p;
317 $objstr = &objects
($p, "X.o", "X.res.o", undef);
318 print &splitline
($prog . ".exe: " . $objstr), "\n";
319 my $mw = $type eq "G" ?
" -mwindows" : "";
320 $libstr = &objects
($p, undef, undef, "-lX");
321 print &splitline
("\t\$(CC)" . $mw . " \$(LDFLAGS) -o \$@ " .
322 $objstr . " $libstr", 69), "\n\n";
324 foreach $d (&deps
("X.o", "X.res.o", "", "/")) {
325 print &splitline
(sprintf("%s: %s", $d->{obj
}, join " ", @
{$d->{deps
}})),
330 "version.o: FORCE;\n".
331 "# Hack to force version.o to be rebuilt always\n".
333 "\t\$(CC) \$(COMPAT) \$(FWHACK) \$(XFLAGS) \$(CFLAGS) \$(VER) -c version.c\n".
335 "\trm -f *.o *.exe *.res.o\n".
337 select STDOUT
; close OUT
;
339 ##-- Borland makefile
340 %stdlibs = ( # Borland provides many Win32 API libraries intrinsically
352 open OUT
, ">Makefile.bor"; select OUT
;
354 "# Makefile for PuTTY under Borland C.\n".
355 "#\n# This file was created by `mkfiles.pl' from the `Recipe' file.\n".
356 "# DO NOT EDIT THIS FILE DIRECTLY; edit Recipe or mkfiles.pl instead.\n";
357 # bcc32 command line option is -D not /D
358 ($_ = $help) =~ s/=\/D/=-D
/gs
;
362 "# If you rename this file to `Makefile', you should change this line,\n".
363 "# so that the .rsp files still depend on the correct makefile.\n".
364 "MAKEFILE = Makefile.bor\n".
366 "# C compilation flags\n".
367 "CFLAGS = -D_WINDOWS -DWINVER=0x0401\n".
369 "# Get include directory for resource compiler\n".
371 "BCB = \$(MAKEDIR)\\..\n".
375 &splitline
("\tbcc32 -w-aus -w-ccc -w-par -w-pia \$(COMPAT) \$(FWHACK)".
376 " \$(XFLAGS) \$(CFLAGS) /c \$*.c",69)."\n".
378 &splitline
("\tbrcc32 \$(FWHACK) \$(RCFL) -i \$(BCB)\\include -r".
379 " -DNO_WINRESRC_H -DWIN32 -D_WIN32 -DWINVER=0x0401 \$*.rc",69)."\n".
381 print &splitline
("all:" . join "", map { " $_.exe" } &progrealnames
("GC"));
383 foreach $p (&prognames
("GC")) {
384 ($prog, $type) = split ",", $p;
385 $objstr = &objects
($p, "X.obj", "X.res", undef);
386 print &splitline
("$prog.exe: " . $objstr . " $prog.rsp"), "\n";
387 my $ap = ($type eq "G") ?
"-aa" : "-ap";
388 print "\tilink32 $ap -Gn -L\$(BCB)\\lib \@$prog.rsp\n\n";
390 foreach $p (&prognames
("GC")) {
391 ($prog, $type) = split ",", $p;
392 print $prog, ".rsp: \$(MAKEFILE)\n";
393 $objstr = &objects
($p, "X.obj", undef, undef);
394 @objlist = split " ", $objstr;
396 foreach $i (@objlist) {
397 if (length($objlines[$#objlines] . " $i") > 50) {
400 $objlines[$#objlines] .= " $i";
402 $c0w = ($type eq "G") ?
"c0w32" : "c0x32";
403 print "\techo $c0w + > $prog.rsp\n";
404 for ($i=0; $i<=$#objlines; $i++) {
405 $plus = ($i < $#objlines ?
" +" : "");
406 print "\techo$objlines[$i]$plus >> $prog.rsp\n";
408 print "\techo $prog.exe >> $prog.rsp\n";
409 $objstr = &objects
($p, "X.obj", "X.res", undef);
410 @libs = split " ", &objects
($p, undef, undef, "X");
411 @libs = grep { !$stdlibs{$_} } @libs;
412 unshift @libs, "cw32", "import32";
413 $libstr = join ' ', @libs;
414 print "\techo nul,$libstr, >> $prog.rsp\n";
415 print "\techo " . &objects
($p, undef, "X.res", undef) . " >> $prog.rsp\n";
418 foreach $d (&deps
("X.obj", "X.res", "", "\\")) {
419 print &splitline
(sprintf("%s: %s", $d->{obj
}, join " ", @
{$d->{deps
}})),
424 "version.o: FORCE\n".
425 "# Hack to force version.o to be rebuilt always\n".
427 "\tbcc32 \$(FWHACK) \$(VER) \$(CFLAGS) /c version.c\n\n".
438 "\t-del *.\$\$\$\$\$\$\n";
439 select STDOUT
; close OUT
;
441 ##-- Visual C++ makefile
442 open OUT
, ">Makefile.vc"; select OUT
;
444 "# Makefile for PuTTY under Visual C.\n".
445 "#\n# This file was created by `mkfiles.pl' from the `Recipe' file.\n".
446 "# DO NOT EDIT THIS FILE DIRECTLY; edit Recipe or mkfiles.pl instead.\n";
450 "# If you rename this file to `Makefile', you should change this line,\n".
451 "# so that the .rsp files still depend on the correct makefile.\n".
452 "MAKEFILE = Makefile.vc\n".
454 "# C compilation flags\n".
455 "CFLAGS = /nologo /W3 /O1 /D_WINDOWS /D_WIN32_WINDOWS=0x401 /DWINVER=0x401\n".
456 "LFLAGS = /incremental:no /fixed\n".
459 "\tcl \$(COMPAT) \$(FWHACK) \$(XFLAGS) \$(CFLAGS) /c \$*.c\n".
461 "\trc \$(FWHACK) \$(RCFL) -r -DWIN32 -D_WIN32 -DWINVER=0x0400 \$*.rc\n".
463 print &splitline
("all:" . join "", map { " $_.exe" } &progrealnames
("GC"));
465 foreach $p (&prognames
("GC")) {
466 ($prog, $type) = split ",", $p;
467 $objstr = &objects
($p, "X.obj", "X.res", undef);
468 print &splitline
("$prog.exe: " . $objstr . " $prog.rsp"), "\n";
469 print "\tlink \$(LFLAGS) -out:$prog.exe -map:$prog.map \@$prog.rsp\n\n";
471 foreach $p (&prognames
("GC")) {
472 ($prog, $type) = split ",", $p;
473 print $prog, ".rsp: \$(MAKEFILE)\n";
474 $objstr = &objects
($p, "X.obj", "X.res", "X.lib");
475 @objlist = split " ", $objstr;
477 foreach $i (@objlist) {
478 if (length($objlines[$#objlines] . " $i") > 50) {
481 $objlines[$#objlines] .= " $i";
483 $subsys = ($type eq "G") ?
"windows" : "console";
484 print "\techo /nologo /subsystem:$subsys > $prog.rsp\n";
485 for ($i=0; $i<=$#objlines; $i++) {
486 print "\techo$objlines[$i] >> $prog.rsp\n";
490 foreach $d (&deps
("X.obj", "X.res", "", "\\")) {
491 print &splitline
(sprintf("%s: %s", $d->{obj
}, join " ", @
{$d->{deps
}})),
496 "# Hack to force version.o to be rebuilt always\n".
497 "version.obj: *.c *.h *.rc\n".
498 "\tcl \$(FWHACK) \$(VER) \$(CFLAGS) /c version.c\n\n".
516 "\t-del debug.log\n";
517 select STDOUT
; close OUT
;
519 ##-- X/GTK/Unix makefile
520 open OUT
, ">unix/Makefile.gtk"; select OUT
;
522 "# Makefile for PuTTY under X/GTK and Unix.\n".
523 "#\n# This file was created by `mkfiles.pl' from the `Recipe' file.\n".
524 "# DO NOT EDIT THIS FILE DIRECTLY; edit Recipe or mkfiles.pl instead.\n";
525 # gcc command line option is -D not /D
526 ($_ = $help) =~ s/=\/D/=-D
/gs
;
530 "# You can define this path to point at your tools if you need to\n".
531 "# TOOLPATH = /opt/gcc/bin\n".
532 "CC = \$(TOOLPATH)cc\n".
534 &splitline
("CFLAGS = -Wall -g -I. -I.. `gtk-config --cflags`")."\n".
535 "XLDFLAGS = `gtk-config --libs`\n".
538 "INSTALL_PROGRAM=\$(INSTALL)\n",
539 "INSTALL_DATA=\$(INSTALL)\n",
540 "prefix=/usr/local\n",
541 "exec_prefix=\$(prefix)\n",
542 "bindir=\$(exec_prefix)/bin\n",
543 "mandir=\$(prefix)/man\n",
544 "man1dir=\$(mandir)/man1\n",
549 "\t\$(CC) \$(COMPAT) \$(FWHACK) \$(XFLAGS) \$(CFLAGS) -c \$<\n".
551 print &splitline
("all:" . join "", map { " $_" } &progrealnames
("XU"));
553 foreach $p (&prognames
("XU")) {
554 ($prog, $type) = split ",", $p;
555 $objstr = &objects
($p, "X.o", undef, undef);
556 print &splitline
($prog . ": " . $objstr), "\n";
557 $libstr = &objects
($p, undef, undef, "-lX");
558 print &splitline
("\t\$(CC)" . $mw . " \$(${type}LDFLAGS) -o \$@ " .
559 $objstr . " $libstr", 69), "\n\n";
561 foreach $d (&deps
("X.o", undef, "../", "/")) {
562 print &splitline
(sprintf("%s: %s", $d->{obj
}, join " ", @
{$d->{deps
}})),
567 "version.o: FORCE;\n".
568 "# Hack to force version.o to be rebuilt always\n".
570 "\t\$(CC) \$(COMPAT) \$(FWHACK) \$(XFLAGS) \$(CFLAGS) \$(VER) -c ../version.c\n".
572 "\trm -f *.o". (join "", map { " $_" } &progrealnames
("XU")) . "\n".
575 map("\t\$(INSTALL_PROGRAM) -m 755 $_ \$(bindir)/$_\n", &progrealnames
("XU")),
576 map("\t\$(INSTALL_DATA) -m 644 $_ \$(man1dir)/$_\n", &manpages
("XU", "1")),
579 "\t\$(MAKE) install INSTALL_PROGRAM=\"\$(INSTALL_PROGRAM) -s\"\n",
581 select STDOUT
; close OUT
;
584 open OUT
, ">mac/Makefile.mpw"; select OUT
;
586 # Makefile for PuTTY under MPW.
588 # This file was created by `mkfiles.pl' from the `Recipe' file.
589 # DO NOT EDIT THIS FILE DIRECTLY; edit Recipe or mkfiles.pl instead.
591 # MPW command line option is -d not /D
592 ($_ = $help) =~ s/=\/D/=-d
/gs
;
596 # -w 35 disables "unused parameter" warnings
597 COptions = -i : -i :: -w 35 -w err -proto strict
598 COptions_68K = {COptions} -model far -opt space
599 # Enabling "-opt space" for CFM-68K gives me undefined references to
600 # _$LDIVT and _$LMODT.
601 COptions_CFM68K = {COptions} -model cfmSeg -opt time
602 COptions_PPC = {COptions} -opt size
604 LinkOptions = -c 'pTTY' -fragname PuTTY
605 LinkOptions_68K = {LinkOptions} -br 68k -model far -compact
606 LinkOptions_CFM68K = {LinkOptions} -br 020 -model cfmseg -compact
607 LinkOptions_PPC = {LinkOptions}
609 Libs_68K = "{CLibraries}StdCLib.far.o" \xb6
610 "{Libraries}MacRuntime.o" \xb6
611 "{Libraries}MathLib.far.o" \xb6
612 "{Libraries}IntEnv.far.o" \xb6
613 "{Libraries}Interface.o" \xb6
614 "{Libraries}UnicodeConverterLib.far.o"
616 Libs_CFM = "{SharedLibraries}InterfaceLib" \xb6
617 "{SharedLibraries}StdCLib" \xb6
618 "{SharedLibraries}AppearanceLib" \xb6
619 -weaklib AppearanceLib \xb6
620 "{SharedLibraries}TextCommon" \xb6
621 -weaklib TextCommon \xb6
622 "{SharedLibraries}UnicodeConverter" \xb6
623 -weaklib UnicodeConverter
625 Libs_CFM68K = {Libs_CFM} \xb6
626 "{CFM68KLibraries}NuMacRuntime.o"
628 Libs_PPC = {Libs_CFM} \xb6
629 "{PPCLibraries}StdCRuntime.o" \xb6
630 "{PPCLibraries}PPCCRuntime.o" \xb6
631 "{PPCLibraries}CarbonAccessors.o"
634 print &splitline
("all \xc4 " . join(" ", &progrealnames
("M")), undef, "\xb6");
636 foreach $p (&prognames
("M")) {
637 ($prog, $type) = split ",", $p;
639 print &splitline
("$prog \xc4 $prog.68k $prog.cfm68k $prog.ppc",
640 undef, "\xb6"), "\n\n";
642 $rsrc = &objects
($p, "", "X.rsrc", undef);
644 $objstr = &objects
($p, "X.68k.o", "", undef);
645 print &splitline
("$prog.68k \xc4 $objstr $rsrc", undef, "\xb6"), "\n";
646 print &splitline
("\tDuplicate -y $rsrc {Targ}", 69, "\xb6"), "\n";
647 print &splitline
("\tILink -o {Targ} {LinkOptions_68K} " .
648 $objstr . " {Libs_68K}", 69, "\xb6"), "\n";
649 print &splitline
("\tSetFile -a BM {Targ}", 69, "\xb6"), "\n\n";
651 $objstr = &objects
($p, "X.cfm68k.o", "", undef);
652 print &splitline
("$prog.cfm68k \xc4 $objstr", undef, "\xb6"), "\n";
653 print &splitline
("\tDuplicate -y $rsrc {Targ}", 69, "\xb6"), "\n";
654 print &splitline
("\tILink -o {Targ} {LinkOptions_CFM68K} " .
655 $objstr . " {Libs_CFM68K}", 69, "\xb6"), "\n";
656 print &splitline
("\tSetFile -a BM {Targ}", 69, "\xb6"), "\n\n";
658 $objstr = &objects
($p, "X.ppc.o", "", undef);
659 print &splitline
("$prog.ppc \xc4 $objstr", undef, "\xb6"), "\n";
660 print &splitline
("\tDuplicate -y $rsrc {Targ}", 69, "\xb6"), "\n";
661 print &splitline
("\tPPCLink -o {Targ} {LinkOptions_PPC} " .
662 $objstr . " {Libs_PPC}", 69, "\xb6"), "\n";
663 print &splitline
("\tSetFile -a BM {Targ}", 69, "\xb6"), "\n\n";
665 foreach $d (&deps
("", "X.rsrc", "::", ":")) {
666 next unless $d->{obj
};
667 print &splitline
(sprintf("%s \xc4 %s", $d->{obj
}, join " ", @
{$d->{deps
}}),
668 undef, "\xb6"), "\n";
669 print "\tRez ", $d->{deps
}->[0], " -o {Targ} {ROptions}\n\n";
671 foreach $d (&deps
("X.68k.o", "", "::", ":")) {
672 next unless $d->{obj
};
673 print &splitline
(sprintf("%s \xc4 %s", $d->{obj
}, join " ", @
{$d->{deps
}}),
674 undef, "\xb6"), "\n";
675 print "\t{C} ", $d->{deps
}->[0], " -o {Targ} {COptions_68K}\n\n";
677 foreach $d (&deps
("X.cfm68k.o", "", "::", ":")) {
678 next unless $d->{obj
};
679 print &splitline
(sprintf("%s \xc4 %s", $d->{obj
}, join " ", @
{$d->{deps
}}),
680 undef, "\xb6"), "\n";
681 print "\t{C} ", $d->{deps
}->[0], " -o {Targ} {COptions_CFM68K}\n\n";
683 foreach $d (&deps
("X.ppc.o", "", "::", ":")) {
684 next unless $d->{obj
};
685 print &splitline
(sprintf("%s \xc4 %s", $d->{obj
}, join " ", @
{$d->{deps
}}),
686 undef, "\xb6"), "\n";
687 # The odd stuff here seems to stop afpd getting confused.
688 print "\techo -n > {Targ}\n";
689 print "\tsetfile -t XCOF {Targ}\n";
690 print "\t{PPCC} ", $d->{deps
}->[0], " -o {Targ} {COptions_PPC}\n\n";
692 select STDOUT
; close OUT
;