# HACK: One of the source files in `charset' is auto-generated by
# sbcsgen.pl. We need to generate that _now_, before attempting
# dependency analysis.
-eval 'chdir "charset"; require "sbcsgen.pl"; chdir ".."';
+eval 'chdir "charset"; require "sbcsgen.pl"; chdir ".."; select STDOUT;';
@srcdirs = ("./");
}
if ($_[0] eq "!forceobj") { $forceobj{$_[1]} = 1; next; }
if ($_[0] eq "!begin") {
- if (&mfval($_[1])) {
+ if ($_[1] =~ /^>(.*)/) {
+ $divert = \$auxfiles{$1};
+ } elsif (&mfval($_[1])) {
$sect = $_[2] ? $_[2] : "end";
$divert = \($makefile_extra{$_[1]}->{$sect});
} else {
close IN;
+foreach $aux (sort keys %auxfiles) {
+ open AUX, ">$aux";
+ print AUX $auxfiles{$aux};
+ close AUX;
+}
+
# Now retrieve the complete list of objects and resource files, and
# construct dependency data for them. While we're here, expand the
# object list for each program, and complain if its type isn't set.
##-- CygWin makefile
open OUT, ">$makefiles{'cygwin'}"; select OUT;
print
- "# Makefile for $project_name under cygwin.\n".
+ "# Makefile for $project_name under Cygwin, MinGW, or Winelib.\n".
"#\n# This file was created by `mkfiles.pl' from the `Recipe' file.\n".
"# DO NOT EDIT THIS FILE DIRECTLY; edit Recipe or mkfiles.pl instead.\n";
# gcc command line option is -D not /D
"# RCINC = --include-dir c:\\cygwin\\include\\\n".
"\n".
&splitline("CFLAGS = -mno-cygwin -Wall -O2 -D_WINDOWS -DDEBUG -DWIN32S_COMPAT".
- " -D_NO_OLDNAMES -DNO_MULTIMON -DNO_HTMLHELP " .
+ " -D_NO_OLDNAMES -DNO_MULTIMON -DNO_HTMLHELP -DNO_SECUREZEROMEMORY " .
(join " ", map {"-I$dirpfx$_"} @srcdirs)) .
"\n".
"LDFLAGS = -mno-cygwin -s\n".
join " ", @{$d->{deps}})), "\n";
}
if ($d->{obj} =~ /\.res\.o$/) {
- print "\t\$(RC) \$(RCFL) \$(RCFLAGS) ".$d->{deps}->[0]." ".$d->{obj}."\n\n";
+ print "\t\$(RC) \$(RCFL) \$(RCFLAGS) ".$d->{deps}->[0]." -o ".$d->{obj}."\n\n";
} else {
print "\t\$(CC) \$(COMPAT) \$(CFLAGS) \$(XFLAGS) -c ".$d->{deps}->[0]."\n\n";
}
print "\n";
print $makefile_extra{'cygwin'}->{'end'};
print "\nclean:\n".
- "\trm -f *.o *.exe *.res.o *.map\n".
+ "\trm -f *.o *.exe *.res.o *.so *.map\n".
"\n".
"FORCE:\n";
select STDOUT; close OUT;
$objtosrc{$d->{obj}} = $d->{deps}->[0];
}
- @amcflags = ("\$(COMPAT)", "\$(XFLAGS)", map {"-I$dirpfx$_"} @srcdirs);
+ print &splitline(join " ", "AM_CPPFLAGS", "=",
+ map {"-I$dirpfx$_"} @srcdirs), "\n";
+
+ @amcflags = ("\$(COMPAT)", "\$(XFLAGS)", "\$(WARNINGOPTS)");
print "if HAVE_GTK\n";
print &splitline(join " ", "AM_CFLAGS", "=",
"\$(GTK_CFLAGS)", @amcflags), "\n";