This commit is contained in:
Nishi 2026-05-10 05:00:24 +09:00
commit 4437941405
Signed by: nishi
GPG key ID: 27EF69B208EB9343
2 changed files with 11 additions and 2 deletions

View file

@ -136,7 +136,15 @@ pmake.libdirs = function(target) {
pmake.libs = function(target, if_str) {
function libs(x) {
if(x instanceof pmake.LibraryProject) {
const r = pmake.resolveProjects(x.libraries, if_str).concat([ x.base + "/" + pmake.compiler.output(x) ]);
function recursion(x) {
if(x instanceof pmake.LibraryProject) {
return pmake.libs(x, if_str);
} else {
return [ x ];
}
}
const r = x.libraries.map(recursion).flat().concat([ x.base + "/" + pmake.compiler.output(x) ]);
return r;
} else if((typeof x) == "string") {