]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - keystone-rtos/mcbsp-lld.git/blobdiff - src/Module.xs
PRSDK-3513 Modified xs file to build.
[keystone-rtos/mcbsp-lld.git] / src / Module.xs
index 96debe7e6feaf25fdc019f0bdf92e19266c88d79..a91726d8c61a77f05ff27f1e58e666752b8c466a 100644 (file)
@@ -28,43 +28,45 @@ var mcbsplldFile = [
 function modBuild() 
 {
 
-    /* Build the device independent libraries for all the targets specified. */
-    for (var targets=0; targets < socs["all"].targets.length; targets++)
+    if (socs.length != 0)
     {
-        var targetFiles = mcbsplldFile.slice(); /* make copy */
-        var libOptions = {
-            copts: socs["all"].copts,
-            incs:  mcbsplldIncPath, 
-        };
-        libUtility.buildLibrary ("",  "false", libOptions, Pkg.name, socs["all"].targets[targets], targetFiles);
-    }
-
-    
-    /* Build library targets for device dependent SoCs */
-    for (var soc=0; soc < soc_names.length; soc++) 
-    {
-        var dev = socs[soc_names[soc]];
+        /* Build the device independent libraries for all the targets specified. */
+        for (var targets=0; targets < socs["all"].targets.length; targets++)
+        {
+            if(socs["all"].build == "false")
+                            continue;
+                    var targetFiles = mcasplldFiles.slice(); /* make copy */
+            var libOptions = {
+                copts: socs["all"].copts,
+                incs:  lldIncludePath, 
+            };
+            libUtility.buildLibrary ("",  "false", "false", libOptions, Pkg.name, socs["all"].targets[targets], targetFiles);
+        }
         
-        /* do not proceed if this SoC is not configured to be built */
-        if (dev.build == "false")
-           continue;
+        /* Build library targets for device dependent SoCs */
+        for (var soc=0; soc < soc_names.length; soc++) 
+        {
+            var dev = socs[soc_names[soc]];
+            
+            /* do not proceed if this SoC is not configured to be built */
+            if (dev.build == "false")
+               continue;
 
-        if (dev.socDevLib == "true")
-        { 
-            var targetFiles_soc = mcbsplldFile.slice(); /* make copy */
-            targetFiles_soc.push (deviceConstruct[0]+soc_names[soc]+deviceConstruct[1]);
-            /* Build the libraries for all the targets specified. */
-            for (var targets=0; targets < dev.targets.length; targets++)
-            {
-                var libOptions = {
-                    copts: dev.copts,
-                    incs:  mcbsplldIncPath, 
-                };
-                libUtility.buildLibrary (soc_names[soc], "true", libOptions, Pkg.name, dev.targets[targets], targetFiles_soc);
+            if (dev.socDevLib == "true")
+            { 
+                var targetFiles_soc = mcasplldFiles.slice(); /* make copy */
+                targetFiles_soc.push (deviceConstruct[0]+soc_names[soc]+deviceConstruct[1]);
+                /* Build the libraries for all the targets specified. */
+                for (var targets=0; targets < dev.targets.length; targets++)
+                {
+                    var libOptions = {
+                        copts: dev.copts,
+                        incs:  lldIncludePath, 
+                    };
+                    libUtility.buildLibrary (soc_names[soc], "false", "true", libOptions, Pkg.name, dev.targets[targets], targetFiles_soc);
+                }
             }
-         }
-
-            
+        }        
     }
 
     /* Add all the .c files to the release package. */
@@ -76,5 +78,10 @@ function modBuild()
     var testFiles = libUtility.listAllFiles (".h", "src", true);
     for (var k = 0 ; k < testFiles.length; k++)
         Pkg.otherFiles[Pkg.otherFiles.length++] = testFiles[k];
+
+    /* Add all the .mk files to the release package. */
+    var mkFiles = libUtility.listAllFiles (".mk", "src", true);
+    for (var k = 0 ; k < mkFiles.length; k++)
+        Pkg.otherFiles[Pkg.otherFiles.length++] = mkFiles[k];
 }