First draft of Unicode support in pterm. It's pretty complete: it
[u/mdw/putty] / mkfiles.pl
index fabdc87..384a88e 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
@@ -293,6 +298,9 @@ print
 "# TOOLPATH = /pkg/mingw32msvc/i386-mingw32msvc/bin/\n".
 "CC = \$(TOOLPATH)gcc\n".
 "RC = \$(TOOLPATH)windres\n".
+"# Uncomment the following two lines to compile under Winelib\n".
+"# CC = winegcc\n".
+"# RC = wrc\n".
 "# You may also need to tell windres where to find include files:\n".
 "# RCINC = --include-dir c:\\cygwin\\include\\\n".
 "\n".
@@ -531,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",
@@ -593,6 +601,8 @@ END
 print $_;
 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_68K = {COptions} -model far -opt space
@@ -649,14 +659,14 @@ foreach $p (&prognames("M")) {
   print &splitline("\tSetFile -a BM {Targ}", 69, "\xb6"), "\n\n";
 
   $objstr = &objects($p, "X.cfm68k.o", "", undef);
-  print &splitline("$prog.cfm68k \xc4 $objstr", undef, "\xb6"), "\n";
+  print &splitline("$prog.cfm68k \xc4 $objstr $rsrc", undef, "\xb6"), "\n";
   print &splitline("\tDuplicate -y $rsrc {Targ}", 69, "\xb6"), "\n";
   print &splitline("\tILink -o {Targ} {LinkOptions_CFM68K} " .
                    $objstr . " {Libs_CFM68K}", 69, "\xb6"), "\n";
   print &splitline("\tSetFile -a BM {Targ}", 69, "\xb6"), "\n\n";
 
   $objstr = &objects($p, "X.ppc.o", "", undef);
-  print &splitline("$prog.ppc \xc4 $objstr", undef, "\xb6"), "\n";
+  print &splitline("$prog.ppc \xc4 $objstr $rsrc", undef, "\xb6"), "\n";
   print &splitline("\tDuplicate -y $rsrc {Targ}", 69, "\xb6"), "\n";
   print &splitline("\tPPCLink -o {Targ} {LinkOptions_PPC} " .
                    $objstr . " {Libs_PPC}", 69, "\xb6"), "\n";