This commit is contained in:
Nishi 2026-05-12 08:36:20 +09:00
commit 831c207d25
3 changed files with 8 additions and 5 deletions

View file

@ -133,21 +133,22 @@ pmake.libdirs = function(target) {
return target.libdirs.concat(targets.map(libdirs).flat());
};
pmake.libs = function(target, if_str) {
pmake.libs = function(target, if_str, nostr) {
function libs(x) {
if(x instanceof pmake.LibraryProject) {
function recursion(x) {
if(x instanceof pmake.LibraryProject) {
return pmake.libs(x, if_str);
} else {
} else if(!nostr) {
return [ x ];
}
return [];
}
const r = x.libraries.map(recursion).flat().concat([ x.base + "/" + pmake.compiler.output(x) ]);
return r;
} else if((typeof x) == "string") {
} else if((typeof x) == "string" && !nostr) {
return [ x ];
}