From a4a15594464d6c72901decf89fdf05778867360a Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Fri, 26 Jan 2007 19:43:15 +0000 Subject: [PATCH] Switch round the order of CFLAGS and XFLAGS, so that the latter comes last on the compiler command line. This makes it easier to override the normal compile options (since conflicting command-line options usually follow a last-wins policy) in order to compile (for example) the Unix version -g -O0. git-svn-id: http://svn.tartarus.org/sgt/putty@7170 cda61777-01e9-0310-a592-d414129be87e --- mkfiles.pl | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/mkfiles.pl b/mkfiles.pl index ca51b765..94a83c7c 100755 --- a/mkfiles.pl +++ b/mkfiles.pl @@ -429,7 +429,7 @@ if (defined $makefiles{'cygwin'}) { if ($d->{obj} =~ /\.res\.o$/) { print "\t\$(RC) \$(RCFL) \$(RCFLAGS) ".$d->{deps}->[0]." ".$d->{obj}."\n\n"; } else { - print "\t\$(CC) \$(COMPAT) \$(XFLAGS) \$(CFLAGS) -c ".$d->{deps}->[0]."\n\n"; + print "\t\$(CC) \$(COMPAT) \$(CFLAGS) \$(XFLAGS) -c ".$d->{deps}->[0]."\n\n"; } } print "\n"; @@ -486,7 +486,7 @@ if (defined $makefiles{'borland'}) { "\n". ".c.obj:\n". &splitline("\tbcc32 -w-aus -w-ccc -w-par -w-pia \$(COMPAT)". - " \$(XFLAGS) \$(CFLAGS) ". + " \$(CFLAGS) \$(XFLAGS) ". (join " ", map {"-I$dirpfx$_"} @srcdirs) . " /c \$*.c",69)."\n". ".rc.res:\n". @@ -615,7 +615,7 @@ if (defined $makefiles{'vc'}) { print &splitline(sprintf("%s: %s", $d->{obj}, join " ", @$extradeps, @{$d->{deps}})), "\n"; if ($d->{obj} =~ /.obj$/) { - print "\tcl \$(COMPAT) \$(XFLAGS) \$(CFLAGS) /c ".$d->{deps}->[0],"\n\n"; + print "\tcl \$(COMPAT) \$(CFLAGS) \$(XFLAGS) /c ".$d->{deps}->[0],"\n\n"; } else { print "\trc \$(RCFL) -r \$(RCFLAGS) ".$d->{deps}->[0],"\n\n"; } @@ -962,7 +962,7 @@ if (defined $makefiles{'gtk'}) { print &splitline(sprintf("%s: %s", $d->{obj}, join " ", @{$d->{deps}})), "\n"; } - print &splitline("\t\$(CC) \$(COMPAT) \$(XFLAGS) \$(CFLAGS) -c $d->{deps}->[0]\n"); + print &splitline("\t\$(CC) \$(COMPAT) \$(CFLAGS) \$(XFLAGS) -c $d->{deps}->[0]\n"); } print "\n"; print $makefile_extra{'gtk'}->{'end'}; @@ -1025,7 +1025,7 @@ if (defined $makefiles{'ac'}) { print &splitline(sprintf("%s: %s", $d->{obj}, join " ", @{$d->{deps}})), "\n"; } - print &splitline("\t\$(CC) \$(COMPAT) \$(XFLAGS) \$(CFLAGS) -c $d->{deps}->[0]\n"); + print &splitline("\t\$(CC) \$(COMPAT) \$(CFLAGS) \$(XFLAGS) -c $d->{deps}->[0]\n"); } print "\n"; print $makefile_extra{'gtk'}->{'end'}; @@ -1226,7 +1226,7 @@ if (defined $makefiles{'lcc'}) { } if ($d->{obj} =~ /\.obj$/) { print &splitline("\tlcc -O -p6 \$(COMPAT)". - " \$(XFLAGS) \$(CFLAGS) ".$d->{deps}->[0],69)."\n"; + " \$(CFLAGS) \$(XFLAGS) ".$d->{deps}->[0],69)."\n"; } else { print &splitline("\tlrc \$(RCFL) -r \$(RCFLAGS) ". $d->{deps}->[0],69)."\n"; @@ -1311,9 +1311,9 @@ if (defined $makefiles{'osx'}) { } $firstdep = $d->{deps}->[0]; if ($firstdep =~ /\.c$/) { - print "\t\$(CC) \$(COMPAT) \$(FWHACK) \$(XFLAGS) \$(CFLAGS) -c \$<\n"; + print "\t\$(CC) \$(COMPAT) \$(FWHACK) \$(CFLAGS) \$(XFLAGS) -c \$<\n"; } elsif ($firstdep =~ /\.m$/) { - print "\t\$(CC) -x objective-c \$(COMPAT) \$(FWHACK) \$(XFLAGS) \$(CFLAGS) -c \$<\n"; + print "\t\$(CC) -x objective-c \$(COMPAT) \$(FWHACK) \$(CFLAGS) \$(XFLAGS) -c \$<\n"; } } print "\n".$makefile_extra{'osx'}->{'end'}; -- 2.45.2