diff --git a/package.xs b/package.xs
index 1e36ef29237e3a375584ebc87bf86cd8648c2524..6768b8a5399821a91242a6dc3788b683b3d4482a 100644 (file)
--- a/package.xs
+++ b/package.xs
function getLibs(prog)
{
-
var suffix = prog.build.target.suffix;
-
- /* Default FM library */
var name = this.$name + ".a" + suffix;
+ var socType = this.Settings.deviceType;
+
+ socType = socType.toLowerCase();
+
/* Read LIBDIR variable */
var lib = java.lang.System.getenv("LIBDIR");
print ("\tSystem environment LIBDIR variable defined : " + lib);
}
- /* Device types supported */
- var deviceTypes = [
+ /* SoC types supported */
+ var socTypes = [
'tci6614',
'k2k',
'k2h',
'k2l',
'k2e',
];
-
- /* Search for the supported devices (defined in config.bld) */
- for each(var device in deviceTypes)
+
+ /* Get the SOC */
+ for each (var soc in socTypes)
{
- if (this.Settings.deviceType.equals(device))
+ if (socType.equals(soc))
{
- lib = lib + "/" + device;
+ lib = lib + "/" + soc;
+ name = this.$name + "." + soc + ".a" + suffix;
break;
}
}
/* Get target folder, if applicable */
if ( java.lang.String(suffix).contains('66') )
lib = lib + "/c66";
+ else if ( java.lang.String(suffix).contains('m4') )
+ lib = lib + "/m4";
+ else
+ lib = lib + "/armv7";
/* Get library name with path */
lib = lib + "/" + name;
}
/* Could not find any library, throw exception */
- throw new Error("\tLibrary not found : " + name);
+ throw new Error("\tLibrary not found: " + this.packageBase + lib);
}
/*