]> asedeno.scripts.mit.edu Git - PuTTY.git/blobdiff - mkfiles.pl
SetCurrentProcessExplicitAppUserModelID to fix jumplist/removable media bug
[PuTTY.git] / mkfiles.pl
index a96aa9ae9b4cea88f06fe471a699b58cd6059dfb..166ee1328e184d2253e4c110a3be004e5c1cef9d 100755 (executable)
@@ -84,7 +84,15 @@ while (<IN>) {
   if ($_[0] eq "!specialobj" and &mfval($_[1])) { $specialobj{$_[1]}->{$_[2]} = 1; next;}
   if ($_[0] eq "!cflags" and &mfval($_[1])) {
       ($rest = $_) =~ s/^\s*\S+\s+\S+\s+\S+\s*//; # find rest of input line
-      $rest = 1 if $rest eq "";
+      if ($rest eq "") {
+          # Make sure this file doesn't get lumped together with any
+          # other file's cflags.
+          $rest = "F" . $_[2];
+      } else {
+          # Give this file a specific set of cflags, but permit it to
+          # go together with other files using the same set.
+          $rest = "C" . $rest;
+      }
       $cflags{$_[1]}->{$_[2]} = $rest;
       next;
   }
@@ -433,10 +441,10 @@ $orig_dir = cwd;
 if (defined $makefiles{'cygwin'}) {
     $dirpfx = &dirpfx($makefiles{'cygwin'}, "/");
 
-    ##-- CygWin makefile
+    ##-- MinGW/CygWin makefile (called 'cygwin' for historical reasons)
     open OUT, ">$makefiles{'cygwin'}"; select OUT;
     print
-    "# Makefile for $project_name under Cygwin, MinGW, or Winelib.\n".
+    "# Makefile for $project_name under MinGW, Cygwin, or Winelib.\n".
     "#\n# This file was created by `mkfiles.pl' from the `Recipe' file.\n".
     "# DO NOT EDIT THIS FILE DIRECTLY; edit Recipe or mkfiles.pl instead.\n";
     # gcc command line option is -D not /D
@@ -447,6 +455,7 @@ if (defined $makefiles{'cygwin'}) {
     "# You can define this path to point at your tools if you need to\n".
     "# TOOLPATH = c:\\cygwin\\bin\\ # or similar, if you're running Windows\n".
     "# TOOLPATH = /pkg/mingw32msvc/i386-mingw32msvc/bin/\n".
+    "# TOOLPATH = i686-w64-mingw32-\n".
     "CC = \$(TOOLPATH)gcc\n".
     "RC = \$(TOOLPATH)windres\n".
     "# Uncomment the following two lines to compile under Winelib\n".
@@ -455,11 +464,11 @@ if (defined $makefiles{'cygwin'}) {
     "# You may also need to tell windres where to find include files:\n".
     "# RCINC = --include-dir c:\\cygwin\\include\\\n".
     "\n".
-    &splitline("CFLAGS = -mno-cygwin -Wall -O2 -D_WINDOWS -DDEBUG -DWIN32S_COMPAT".
-      " -D_NO_OLDNAMES -DNO_MULTIMON -DNO_HTMLHELP -DNO_SECUREZEROMEMORY " .
+    &splitline("CFLAGS = -Wall -O2 -D_WINDOWS -DDEBUG -DWIN32S_COMPAT".
+      " -D_NO_OLDNAMES " .
               (join " ", map {"-I$dirpfx$_"} @srcdirs)) .
               "\n".
-    "LDFLAGS = -mno-cygwin -s\n".
+    "LDFLAGS = -s\n".
     &splitline("RCFLAGS = \$(RCINC) --define WIN32=1 --define _WIN32=1 ".
       "--define WINVER=0x0400 ".(join " ", map {"-I$dirpfx$_"} @srcdirs))."\n".
     "\n".
@@ -1552,9 +1561,11 @@ if (defined $makefiles{'am'}) {
 
     %amspeciallibs = ();
     foreach $obj (sort { $a cmp $b } keys %{$cflags{'am'}}) {
+      my $flags = $cflags{'am'}->{$obj};
+      $flags = "" if $flags !~ s/^C//;
       print "lib${obj}_a_SOURCES = ", $objtosrc{$obj}, "\n";
       print &splitline(join " ", "lib${obj}_a_CFLAGS", "=", @amcflags,
-                       $cflags{'am'}->{$obj}), "\n";
+                       $flags), "\n";
       $amspeciallibs{$obj} = "lib${obj}.a";
     }
     print &splitline(join " ", "noinst_LIBRARIES", "=",