+
+##-- MPW Makefile
+open OUT, ">mac/Makefile.mpw"; select OUT;
+print <<END;
+# Makefile for PuTTY under MPW.
+#
+# This file was created by `mkfiles.pl' from the `Recipe' file.
+# DO NOT EDIT THIS FILE DIRECTLY; edit Recipe or mkfiles.pl instead.
+END
+# MPW command line option is -d not /D
+($_ = $help) =~ s/=\/D/=-d /gs;
+print $_;
+print <<END;
+
+COptions = -i : -i ::
+COptions_68K = {COptions} -proto strict -model far
+# disable "unused parameter" warnings
+COptions_PPC = {COptions} -w 35
+ILinkOptions = -t 'APPL' -c 'pTTY' -br 68k -model far
+
+Libs_68K = "{CLibraries}StdCLib.o" \xb6
+ "{Libraries}MacRuntime.o" \xb6
+ "{Libraries}MathLib.far.o" \xb6
+ "{Libraries}IntEnv.o" \xb6
+ "{Libraries}Interface.o" \xb6
+ "{Libraries}OpenTransport.o" \xb6
+ "{Libraries}OpenTransportApp.o" \xb6
+ "{Libraries}OpenTptInet.o" \xb6
+ "{Libraries}UnicodeConverterLib.far.o"
+
+Libs_PPC = "{SharedLibraries}InterfaceLib" \xb6
+ "{SharedLibraries}StdCLib" \xb6
+ "{SharedLibraries}MathLib" \xb6
+ "{SharedLibraries}AppearanceLib" \xb6
+ -weaklib AppearanceLib \xb6
+ "{SharedLibraries}OpenTransportLib" \xb6
+ -weaklib OTGlobalLib \xb6
+ -weaklib OTUtilityLib \xb6
+ -weaklib OTClientUtilLib \xb6
+ -weaklib OTClientLib \xb6
+ -weaklib OTStreamUnixLib \xb6
+ -weaklib OTXTILib \xb6
+ -weaklib OTConfigLib \xb6
+ -weaklib OTNtvUtilLib \xb6
+ -weaklib OTNativeClientLib \xb6
+ "{SharedLibraries}OpenTptInternetLib" \xb6
+ -weaklib OTInetClientLib \xb6
+ "{PPCLibraries}StdCRuntime.o" \xb6
+ "{PPCLibraries}PPCCRuntime.o" \xb6
+ "{PPCLibraries}OpenTransportAppPPC.o" \xb6
+ "{PPCLibraries}OpenTptInetPPC.o"
+
+
+END
+print &splitline("all \xc4 " . join(" ", &progrealnames("M")), undef, "\xb6");
+print "\n\n";
+foreach $p (&prognames("M")) {
+ ($prog, $type) = split ",", $p;
+ $objstr = &objects($p, "X.c.o", undef, undef);
+ print &splitline($prog . " \xc4 " . $objstr, undef, "\xb6"), "\n";
+ print &splitline("\tILink -o {Targ} {ILinkOptions} " .
+ $objstr . " {Libs_68K}", 69, "\xb6"), "\n\n";
+}
+foreach $d (&deps("X.c.o", undef, "::", ":")) {
+ print &splitline(sprintf("%s \xc4 %s", $d->{obj}, join " ", @{$d->{deps}}),
+ undef, "\xb6"), "\n";
+ print "\t{C} ", $d->{deps}->[0], " -o {Targ} {COptions_68K}\n\n";
+}
+foreach $d (&deps("X.c.x", undef, "::", ":")) {
+ print &splitline(sprintf("%s \xc4 %s", $d->{obj}, join " ", @{$d->{deps}}),
+ undef, "\xb6"), "\n";
+ # The odd stuff here seems to stop afpd getting confused.
+ print "\techo -n > {Targ}\n";
+ print "\tsetfile -t XCOF {Targ}\n";
+ print "\t{PPCC} ", $d->{deps}->[0], " -o {Targ} {COptions_PPC}\n\n";
+}
+select STDOUT; close OUT;