From a81df533399ab08ac8ee169cd81bb13c892c31b9 Mon Sep 17 00:00:00 2001 From: simon Date: Tue, 19 Jan 2010 00:56:37 +0000 Subject: [PATCH] Patch inspired by one from James H: remove spurious references to $mw (it should only ever have been used in the Cygwin makefile), and move the libraries to the end of the link line in the Unix makefile for better portability. git-svn-id: svn://svn.tartarus.org/sgt/puzzles@8853 cda61777-01e9-0310-a592-d414129be87e --- mkfiles.pl | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/mkfiles.pl b/mkfiles.pl index 93f3239..7f36f8f 100755 --- a/mkfiles.pl +++ b/mkfiles.pl @@ -1111,8 +1111,8 @@ if (defined $makefiles{'gtk'}) { &splitline("CFLAGS := -O2 -Wall -Werror -ansi -pedantic -g " . (join " ", map {"-I$dirpfx$_"} @srcdirs) . " `\$(GTK_CONFIG) --cflags` \$(CFLAGS)")."\n". - "XLDFLAGS = `\$(GTK_CONFIG) --libs`\n". - "ULDFLAGS =#\n". + "XLIBS = `\$(GTK_CONFIG) --libs`\n". + "ULIBS =#\n". "INSTALL=install\n", "INSTALL_PROGRAM=\$(INSTALL)\n", "INSTALL_DATA=\$(INSTALL)\n", @@ -1130,8 +1130,8 @@ if (defined $makefiles{'gtk'}) { $objstr = &objects($p, "X.o", undef, undef); print &splitline($prog . ": " . $objstr), "\n"; $libstr = &objects($p, undef, undef, "-lX"); - print &splitline("\t\$(CC)" . $mw . " \$(${type}LDFLAGS) -o \$@ " . - $objstr . " $libstr", 69), "\n\n"; + print &splitline("\t\$(CC) -o \$@ $objstr $libstr \$(${type}LIBS)", 69), + "\n\n"; } foreach $d (&deps("X.o", undef, $dirpfx, "/")) { print &splitline(sprintf("%s: %s", $d->{obj}, join " ", @{$d->{deps}})), @@ -1380,7 +1380,7 @@ if (defined $makefiles{'nestedvm'}) { $objstr =~ s/gtk\.o/nestedvm\.o/g; print &splitline($prog . ".mips: " . $objstr), "\n"; $libstr = &objects($p, undef, undef, "-lX"); - print &splitline("\t\$(CC)" . $mw . " \$(${type}LDFLAGS) -o \$@ " . + print &splitline("\t\$(CC) \$(${type}LDFLAGS) -o \$@ " . $objstr . " $libstr -lm", 69), "\n\n"; } foreach $d (&deps("X.o", undef, $dirpfx, "/")) { -- 2.11.0