index bb9268cfd75065832977963eb8f4cff1e8413340..2e6950cc21f961f69bd44f2f7549aa802fbb5817 100644 (file)
/* explicit references to global objects */
var Build = xdc.useModule('xdc.bld.BuildEnvironment');
var Pkg = xdc.useModule('xdc.bld.PackageContents');
-var smpBuild = java.lang.System.getenv("BUILD_SMP");
/* clean lib folder */
Pkg.generatedFiles.$add("lib/");
/* list of libraries to build */
var libArray = new Array();
-if (smpBuild == "1") {
- /* pm library for IPU SMP target */
- libArray.push(
- {
- name: "ti.pm_smp",
- sources: [
- "IpcPower",
- ],
- libAttrs: {
- defs: " -DSMP"
- },
- isas: [ "v7M" ],
- }
- );
-}
-else {
- /* pm library for IPU non-SMP target */
- libArray.push(
- {
- name: "ti.pm",
- sources: [
- "IpcPower",
- ],
- isas: [ "v7M" ],
- }
- );
-
- /* pm library for DSP target */
- libArray.push(
- {
- name: "ti.pm",
- sources: [
- "IpcPowerDsp",
- ],
- isas: [ "64T" ],
- }
- );
-}
-/* generate the package libraries */
-/* check if profile specified in XDCARGS */
-/* XDCARGS="... profile=debug ..." */
-var cmdlProf = (" " + arguments.join(" ") + " ").match(/ profile=([^ ]+) /);
-cmdlProf = cmdlProf != null ? cmdlProf[1] : null;
+/* pm library for IPU SMP target */
+libArray.push(
+ {
+ name: "ti.pm_smp",
+ sources: [
+ "IpcPower",
+ ],
+ libAttrs: {
+ defs: " -DSMP"
+ },
+ isas: [ "v7M" ],
+ }
+);
+
+/* pm library for IPU non-SMP target */
+libArray.push(
+ {
+ name: "ti.pm",
+ sources: [
+ "IpcPower",
+ ],
+ isas: [ "v7M" ],
+ }
+);
+
+/* pm library for DSP target */
+libArray.push(
+ {
+ name: "ti.pm",
+ sources: [
+ "IpcPowerDsp",
+ ],
+ isas: [ "64T" ],
+ }
+);
/* ==== loop over array of libraries ==== */
for (var i = 0; i < libArray.length; i++) {
for (var j = 0; j < Build.targets.length; j++) {
var targ = Build.targets[j];
- /* skip target if not compatible with source code */
- if ("icw" in lib) {
- var skipTarget = true;
- var targIsaChain = "/" + targ.getISAChain().join("/") + "/";
- for (var k = 0; k < lib.icw.length; k++) {
- if (targIsaChain.match("/" + lib.icw[k] + "/")) {
- skipTarget = false;
- break;
- }
- }
- if (skipTarget) continue;
- }
-
/* skip target if it does not generate code for the given isa */
if ("isas" in lib) {
var skipTarget = true;
/* ==== loop over all profiles ==== */
for (var profile in targ.profiles) {
- /* skip profile if different than specified on command line */
- if ((cmdlProf != null) && (profile != cmdlProf)) {
- continue;
- }
-
/* name = lib/profile/name.a+suffix */
var name = "lib/" + profile + "/" + lib.name;