]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - make/unit-cc.pl
Fix modules with 2+ files not having their LinkerFlags parsed.
[user/henk/code/inspircd.git] / make / unit-cc.pl
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;
 }