-#!/usr/bin/env perl -w
+#!/usr/bin/env perl
#
# Cross-platform Makefile generator.
#
# - special-define objects (foo.o[PREPROCSYMBOL]) are not
# supported in the mac or vcproj makefiles.
+use warnings;
use IO::Handle;
use Cwd;
}
}
print "\n";
- print $makefile_extra{'cygwin'};
+ print $makefile_extra{'cygwin'} || "";
print "\nclean:\n".
"\trm -f *.o *.exe *.res.o *.map\n".
"\n";
}
}
print "\n";
- print $makefile_extra{'borland'};
+ print $makefile_extra{'borland'} || "";
print "\nclean:\n".
"\t-del *.obj\n".
"\t-del *.exe\n".
}
}
print "\n";
- print $makefile_extra{'vc'};
+ print $makefile_extra{'vc'} || "";
print "\nclean: tidy\n".
"\t-del *.exe\n\n".
"tidy:\n".
}
}
print "\n";
- print $makefile_extra{'wce'};
+ print $makefile_extra{'wce'} || "";
print "\nclean: tidy\n".
"\t-del *.exe\n\n".
"tidy:\n".
&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",
$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, "/")) {
" -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;
}
}
print "\n";
- print $makefile_extra{'lcc'};
+ print $makefile_extra{'lcc'} || "";
print "\nclean:\n".
"\t-del *.obj\n".
"\t-del *.exe\n".
" -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;
(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";