#!/usr/bin/perl
# -*- perl -*-
-# Copyright (C) 2001
-# Free Software Foundation
+# Copyright (C) 2001-2019 Free Software Foundation, Inc.
#
# This file is part of the libiberty library.
# Libiberty is free software; you can redistribute it and/or
for $f (sort keys %listed) {
if ($f =~ /(.*)\.c$/) {
$base = $1;
- if (! $listed{"$base.o"}) {
+ if (! $listed{"./$base.o"}) {
print "O $f\n";
}
}
$crule = "\tif [ x\"\$(PICFLAG)\" != x ]; then \\\n";
$crule .= "\t \$(COMPILE.c) \$(PICFLAG) \$< -o pic/\$@; \\\n";
$crule .= "\telse true; fi\n";
+ $crule .= "\tif [ x\"\$(NOASANFLAG)\" != x ]; then \\\n";
+ $crule .= "\t \$(COMPILE.c) \$(PICFLAG) \$(NOASANFLAG) \$< -o noasan/\$@; \\\n";
+ $crule .= "\telse true; fi\n";
$crule .= "\t\$(COMPILE.c) \$< \$(OUTPUT_OPTION)\n";
$crule .= "\n";
opendir(INC, $incdir);
while ($f = readdir INC) {
- next unless $f =~ /\.h$/;
+ next unless $f =~ /\.h$/ || $f =~ /\.def$/;
$mine{$f} = "\$(INCDIR)/$f";
$deps{$f} = join(' ', &deps_for("$incdir/$f"));
}
}
@deps = sort { &locals_first($a,$b) } keys %scanned;
$obj = $f;
- $obj =~ s/\.c$/.o/;
+ $obj =~ s/\.c$/.\$(objext)/;
$obj = "./$obj:";
if ($#deps >= 0) {
print OUT "$obj \$(srcdir)/$f";