X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=mkfiles.pl;h=1e9303270d4c910c26b87510f00c9f51fbcaac84;hb=145ecf611238c4f1e39d89d3eee40319a2c54fe8;hp=46ae3189985639de744429c174763db9a6203e88;hpb=5e884cfc276f0dcc642b56c0cf9413846b39704f;p=PuTTY.git diff --git a/mkfiles.pl b/mkfiles.pl index 46ae3189..1e930327 100755 --- a/mkfiles.pl +++ b/mkfiles.pl @@ -84,7 +84,15 @@ while () { 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; } @@ -636,7 +644,7 @@ if (defined $makefiles{'vc'}) { "# C compilation flags\n". "CFLAGS = /nologo /W3 /O1 " . (join " ", map {"-I$dirpfx$_"} @srcdirs) . - " /D_WINDOWS /D_WIN32_WINDOWS=0x500 /DWINVER=0x500\n". + " /D_WINDOWS /D_WIN32_WINDOWS=0x500 /DWINVER=0x500 /D_CRT_SECURE_NO_WARNINGS\n". "LFLAGS = /incremental:no /fixed\n". "RCFLAGS = ".(join " ", map {"-I$dirpfx$_"} @srcdirs). " -DWIN32 -D_WIN32 -DWINVER=0x0400\n". @@ -1552,9 +1560,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", "=",