The CFM-68K build isn't working at the moment (we blow past its global data
[u/mdw/putty] / mkfiles.pl
index 30417b2..554e7a0 100755 (executable)
@@ -11,7 +11,12 @@ use FileHandle;
 
 open IN, "Recipe" or die "unable to open Recipe file\n";
 
-@incdirs = ("", "unix/", "mac/");
+# HACK: One of the source files in `charset' is auto-generated by
+# sbcsgen.pl. We need to generate that _now_, before attempting
+# dependency analysis.
+eval 'chdir "charset"; require "sbcsgen.pl"; chdir ".."';
+
+@incdirs = ("", "charset/", "unix/", "mac/");
 
 $help = ""; # list of newline-free lines of help text
 %programs = (); # maps prog name + type letter to listref of objects/resources
@@ -534,7 +539,7 @@ print
 "# TOOLPATH = /opt/gcc/bin\n".
 "CC = \$(TOOLPATH)cc\n".
 "\n".
-&splitline("CFLAGS = -Wall -g -I. -I.. `gtk-config --cflags`")."\n".
+&splitline("CFLAGS = -Wall -g -I. -I.. -I../charset `gtk-config --cflags`")."\n".
 "XLDFLAGS = `gtk-config --libs`\n".
 "ULDFLAGS =#\n".
 "INSTALL=install\n",
@@ -599,7 +604,8 @@ print <<END;
 ROptions     = `Echo "{VER}" | StreamEdit -e "1,\$ replace /=(\xc5)\xa81\xb0/ 'STR=\xb6\xb6\xb6\xb6\xb6"' \xa81 '\xb6\xb6\xb6\xb6\xb6"'"`
 
 # -w 35 disables "unused parameter" warnings
-COptions     = -i : -i :: -w 35 -w err -proto strict
+COptions     = -i : -i :: -i ::charset -w 35 -w err -proto strict -ansi on \xb6
+              -notOnce
 COptions_68K = {COptions} -model far -opt space
 # Enabling "-opt space" for CFM-68K gives me undefined references to
 # _$LDIVT and _$LMODT.
@@ -631,6 +637,10 @@ Libs_CFM68K =      {Libs_CFM} \xb6
                "{CFM68KLibraries}NuMacRuntime.o"
 
 Libs_PPC =     {Libs_CFM} \xb6
+               "{SharedLibraries}ControlsLib" \xb6
+                       -weaklib ControlsLib \xb6
+               "{SharedLibraries}WindowsLib" \xb6
+                       -weaklib WindowsLib \xb6
                "{PPCLibraries}StdCRuntime.o" \xb6
                "{PPCLibraries}PPCCRuntime.o" \xb6
                "{PPCLibraries}CarbonAccessors.o"
@@ -641,7 +651,7 @@ print "\n\n";
 foreach $p (&prognames("M")) {
   ($prog, $type) = split ",", $p;
 
-  print &splitline("$prog \xc4 $prog.68k $prog.cfm68k $prog.ppc",
+  print &splitline("$prog \xc4 $prog.68k $prog.ppc",
                   undef, "\xb6"), "\n\n";
 
   $rsrc = &objects($p, "", "X.rsrc", undef);