Increase by 1 in every direction the size of the blitter used to save
[sgt/puzzles] / mkfiles.pl
index ad364cd..3df8d16 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/env perl -w
+#!/usr/bin/env perl
 #
 # Cross-platform Makefile generator.
 #
@@ -17,6 +17,7 @@
 #  - special-define objects (foo.o[PREPROCSYMBOL]) are not
 #    supported in the mac or vcproj makefiles.
 
+use warnings;
 use IO::Handle;
 use Cwd;
 
@@ -527,7 +528,7 @@ if (defined $makefiles{'cygwin'}) {
       }
     }
     print "\n";
-    print $makefile_extra{'cygwin'};
+    print $makefile_extra{'cygwin'} || "";
     print "\nclean:\n".
     "\trm -f *.o *.exe *.res.o *.map\n".
     "\n";
@@ -627,7 +628,7 @@ if (defined $makefiles{'borland'}) {
       }
     }
     print "\n";
-    print $makefile_extra{'borland'};
+    print $makefile_extra{'borland'} || "";
     print "\nclean:\n".
     "\t-del *.obj\n".
     "\t-del *.exe\n".
@@ -703,7 +704,7 @@ if (defined $makefiles{'vc'}) {
        }
     }
     print "\n";
-    print $makefile_extra{'vc'};
+    print $makefile_extra{'vc'} || "";
     print "\nclean: tidy\n".
       "\t-del *.exe\n\n".
       "tidy:\n".
@@ -811,7 +812,7 @@ if (defined $makefiles{'wce'}) {
        }
     }
     print "\n";
-    print $makefile_extra{'wce'};
+    print $makefile_extra{'wce'} || "";
     print "\nclean: tidy\n".
       "\t-del *.exe\n\n".
       "tidy:\n".
@@ -1117,8 +1118,8 @@ if (defined $makefiles{'gtk'}) {
     &splitline("CFLAGS := -O2 -Wall -Werror -ansi -pedantic -g " .
               (join " ", map {"-I$dirpfx$_"} @srcdirs) .
               " `\$(GTK_CONFIG) --cflags` \$(CFLAGS)")."\n".
-    "XLIBS = `\$(GTK_CONFIG) --libs`\n".
-    "ULIBS =#\n".
+    "XLIBS = `\$(GTK_CONFIG) --libs` -lm\n".
+    "ULIBS = -lm#\n".
     "INSTALL=install\n",
     "INSTALL_PROGRAM=\$(INSTALL)\n",
     "INSTALL_DATA=\$(INSTALL)\n",
@@ -1136,7 +1137,7 @@ 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) -o \$@ $objstr $libstr \$(${type}LIBS)", 69),
+      print &splitline("\t\$(CC) -o \$@ $objstr $libstr \$(XLFLAGS) \$(${type}LIBS)", 69),
          "\n\n";
     }
     foreach $d (&deps("X.o", undef, $dirpfx, "/")) {
@@ -1147,7 +1148,7 @@ if (defined $makefiles{'gtk'}) {
          " -c \$< -o \$\@\n";
     }
     print "\n";
-    print $makefile_extra{'gtk'};
+    print $makefile_extra{'gtk'} || "";
     print "\nclean:\n".
     "\trm -f *.o". (join "", map { " $_" } &progrealnames("X:U")) . "\n";
     select STDOUT; close OUT;
@@ -1345,7 +1346,7 @@ if (defined $makefiles{'lcc'}) {
       }
     }
     print "\n";
-    print $makefile_extra{'lcc'};
+    print $makefile_extra{'lcc'} || "";
     print "\nclean:\n".
     "\t-del *.obj\n".
     "\t-del *.exe\n".
@@ -1401,7 +1402,7 @@ if (defined $makefiles{'nestedvm'}) {
          " -c \$< -o \$\@\n";
     }
     print "\n";
-    print $makefile_extra{'nestedvm'};
+    print $makefile_extra{'nestedvm'} || "";
     print "\nclean:\n".
     "\trm -rf *.o *.mips *.class *.html *.jar org applet.manifest\n";
     select STDOUT; close OUT;
@@ -1429,9 +1430,9 @@ if (defined $makefiles{'osx'}) {
               (join " ", map {"-I$dirpfx$_"} @srcdirs))."\n".
     "LDFLAGS = -framework Cocoa\n".
     &splitline("all:" . join "", map { " $_" } &progrealnames("MX:U")) .
-    "\n" .
-    $makefile_extra{'osx'} .
-    "\n".
+    "\n";
+    print $makefile_extra{'osx'} || "";
+    print "\n".
     ".SUFFIXES: .o .c .m\n".
     "\n";
     print "\n\n";