]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Fix modules with 2+ files not having their LinkerFlags parsed.
authorPeter Powell <petpow@saberuk.com>
Wed, 3 Jun 2015 13:53:09 +0000 (14:53 +0100)
committerPeter Powell <petpow@saberuk.com>
Wed, 3 Jun 2015 13:59:08 +0000 (14:59 +0100)
make/calcdep.pl
make/unit-cc.pl

index 5130388430949a3b0509e1c96c327013c532f3c4..2348edcebdd9f043ba121300281068e39548ae7a 100755 (executable)
@@ -250,7 +250,7 @@ sub dep_dir($$) {
        if (@ofiles) {
                my $ofiles = join ' ', @ofiles;
                print MAKE "$outdir.so: $ofiles\n";
-               print MAKE "\t@\$(SOURCEPATH)/make/unit-cc.pl link-dir\$(VERBOSE) \$\@ \$^ \$>\n";
+               print MAKE "\t@\$(SOURCEPATH)/make/unit-cc.pl link-dir\$(VERBOSE) \$\@ ${\SOURCEPATH}/src/$dir \$^ \$>\n";
                return 1;
        } else {
                return 0;
index 0a20738db0232dd22c720773924e347b3ac7aaff..aba14a0bc461b5dd338d59ae91cf31e98abee6c0 100755 (executable)
@@ -104,7 +104,11 @@ sub do_core_link {
 }
 
 sub do_link_dir {
-       my $execstr = "$ENV{CXX} -o $out $ENV{PICLDFLAGS} @_";
+       my ($dir, $link_flags) = (shift, '');
+       for my $file (<$dir/*.cpp>) {
+               $link_flags .= get_property($file, 'LinkerFlags') . ' ';
+       }
+       my $execstr = "$ENV{CXX} -o $out $ENV{PICLDFLAGS} $link_flags @_";
        message 'LINK', $out, $execstr;
        exec $execstr;
 }