summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 91cadac)
raw | patch | inline | side by side (parent: 91cadac)
author | Justin Sobota <jsobota@ti.com> | |
Thu, 12 Nov 2015 17:12:06 +0000 (12:12 -0500) | ||
committer | Justin Sobota <jsobota@ti.com> | |
Thu, 12 Nov 2015 17:12:06 +0000 (12:12 -0500) |
Signed-off-by: Justin Sobota <jsobota@ti.com>
c66/qmss/build/buildlib.xs | [new file with mode: 0644] | patch | blob |
c66/qmss/device/Module.xs | [new file with mode: 0644] | patch | blob |
c66/qmss/example/Module.xs | [new file with mode: 0644] | patch | blob |
c66/qmss/package.bld | patch | blob | history | |
c66/srio/example/Module.xs | patch | blob | history | |
c66/srio/package.bld | patch | blob | history |
diff --git a/c66/qmss/build/buildlib.xs b/c66/qmss/build/buildlib.xs
--- /dev/null
@@ -0,0 +1,80 @@
+/******************************************************************************\r
+ * FILE PURPOSE: Build Library Utilities\r
+ ******************************************************************************\r
+ * FILE NAME: buildlib.xs\r
+ *\r
+ * DESCRIPTION: \r
+ * This file contains common routines that are used by the various QMSS IPC\r
+ * transport components.\r
+ *\r
+ * Copyright (C) 2015, Texas Instruments, Inc.\r
+ *****************************************************************************/\r
+\r
+/**************************************************************************\r
+ * FUNCTION NAME : listAllFiles\r
+ **************************************************************************\r
+ * DESCRIPTION :\r
+ * Utility function which lists all files with a specific extension \r
+ * present in a directory and any directory inside it.\r
+ **************************************************************************/\r
+function listAllFiles(ext, dir, recurse)\r
+{ \r
+ var srcFile = [];\r
+ var d;\r
+\r
+ /* If recurse parameter is not specified we default to recursive search. */\r
+ if (recurse == null)\r
+ recurse = true;\r
+\r
+ if (dir == undefined) \r
+ d = ".";\r
+ else \r
+ d = dir;\r
+\r
+ /* Get access to the current directory. */\r
+ var file = new java.io.File(d);\r
+\r
+ /* Check if the file exists and it is a directory. */\r
+ if (file.exists() && file.isDirectory()) \r
+ {\r
+ /* Get a list of all files in the specific directory. */\r
+ var fileList = file.listFiles();\r
+ for (var i = 0; i < fileList.length; i++) \r
+ {\r
+ /* Dont add the generated directory 'package' and any of its files \r
+ * to the list here. */\r
+ if (fileList[i].getName().matches("package") == false)\r
+ {\r
+ /* Check if the detected file is a directory */\r
+ if (fileList[i].isDirectory())\r
+ {\r
+ /* We will recurse into the subdirectory only if required to do so. */\r
+ if (recurse == true)\r
+ {\r
+ /* Generate the directory Name in which we will recurse. */ \r
+ var directoryName = d + "/" + fileList[i].getName();\r
+\r
+ /* Get a list of all files in this directory */\r
+ var fileListing = listAllFiles (ext, directoryName, recurse);\r
+ if (fileListing != null)\r
+ {\r
+ /* Return a list of all file names in the directory. */\r
+ for (var j = 0 ; j < fileListing.length; j++) \r
+ srcFile[srcFile.length++] = fileListing[j];\r
+ }\r
+ }\r
+ }\r
+ else\r
+ {\r
+ /* This was a file. Check if the file name matches the extension */\r
+ if (fileList[i].getName().endsWith(ext) == true)\r
+ srcFile[srcFile.length++] = d + "/" + fileList[i].getName();\r
+ }\r
+ }\r
+ }\r
+\r
+ return srcFile;\r
+ }\r
+ return null;\r
+}\r
+\r
diff --git a/c66/qmss/device/Module.xs b/c66/qmss/device/Module.xs
--- /dev/null
@@ -0,0 +1,29 @@
+/******************************************************************************\r
+ * FILE PURPOSE: QMSS IPC Transport device specific files.\r
+ ******************************************************************************\r
+ * FILE NAME: Module.xs\r
+ *\r
+ * DESCRIPTION: \r
+ * This file contains the module specification for QMSS IPC Transport device\r
+ * specific files.\r
+ *\r
+ * Copyright (C) 2015, Texas Instruments, Inc.\r
+ *****************************************************************************/\r
+\r
+/* Load the library utility. */\r
+var libUtility = xdc.loadCapsule ("../build/buildlib.xs");\r
+\r
+/**************************************************************************\r
+ * FUNCTION NAME : modBuild\r
+ **************************************************************************\r
+ * DESCRIPTION :\r
+ * The function is used to add all the source files in the device \r
+ * directory into the package.\r
+ **************************************************************************/\r
+function modBuild() \r
+{\r
+ /* Add all the .c files to the release package. */\r
+ var configFiles = libUtility.listAllFiles (".c", "device", true);\r
+ for (var k = 0 ; k < configFiles.length; k++)\r
+ Pkg.otherFiles[Pkg.otherFiles.length++] = configFiles[k];\r
+}\r
diff --git a/c66/qmss/example/Module.xs b/c66/qmss/example/Module.xs
--- /dev/null
@@ -0,0 +1,54 @@
+/******************************************************************************\r
+ * FILE PURPOSE: QMSS IPC Transport example files.\r
+ ******************************************************************************\r
+ * FILE NAME: Module.xs\r
+ *\r
+ * DESCRIPTION: \r
+ * This file contains the module specification for QMSS IPC Transport example\r
+ * files.\r
+ *\r
+ * Copyright (C) 2015, Texas Instruments, Inc.\r
+ *****************************************************************************/\r
+\r
+/* Load the library utility. */\r
+var libUtility = xdc.loadCapsule ("../build/buildlib.xs");\r
+\r
+/**************************************************************************\r
+ * FUNCTION NAME : modBuild\r
+ **************************************************************************\r
+ * DESCRIPTION :\r
+ * The function is used to add all the source files in the example \r
+ * directory into the package.\r
+ **************************************************************************/\r
+function modBuild() \r
+{\r
+ /* Add all the .c files to the release package. */\r
+ var exampleFiles = libUtility.listAllFiles (".c", "example", true);\r
+ for (var k = 0 ; k < exampleFiles.length; k++)\r
+ Pkg.otherFiles[Pkg.otherFiles.length++] = exampleFiles[k];\r
+\r
+ /* Add all the .h files to the release package. */\r
+ var exampleFiles = libUtility.listAllFiles (".h", "example", true);\r
+ for (var k = 0 ; k < exampleFiles.length; k++)\r
+ Pkg.otherFiles[Pkg.otherFiles.length++] = exampleFiles[k];\r
+\r
+ /* Add all the .cmd files to the release package. */\r
+ var exampleFiles = libUtility.listAllFiles (".cmd", "example", true);\r
+ for (var k = 0 ; k < exampleFiles.length; k++)\r
+ Pkg.otherFiles[Pkg.otherFiles.length++] = exampleFiles[k];\r
+\r
+ /* Add all the .cfg files to the release package. */\r
+ var exampleFiles = libUtility.listAllFiles (".cfg", "example", true);\r
+ for (var k = 0 ; k < exampleFiles.length; k++)\r
+ Pkg.otherFiles[Pkg.otherFiles.length++] = exampleFiles[k];\r
+\r
+ /* Add all the makefiles files to the release package. */\r
+ var exampleFiles = libUtility.listAllFiles ("makefile", "example", true);\r
+ for (var k = 0 ; k < exampleFiles.length; k++)\r
+ Pkg.otherFiles[Pkg.otherFiles.length++] = exampleFiles[k];\r
+\r
+ /* Add the .txt to the package */\r
+ var exampleFiles = libUtility.listAllFiles (".txt", "example", true);\r
+ for (var k = 0 ; k < exampleFiles.length; k++)\r
+ Pkg.otherFiles[Pkg.otherFiles.length++] = exampleFiles[k];\r
+}\r
diff --git a/c66/qmss/package.bld b/c66/qmss/package.bld
index aaa31735cfe800a756f49138ba31618c707c9974..eff68eb7bc91d3ac842a77575b29a8b0e452d830 100644 (file)
--- a/c66/qmss/package.bld
+++ b/c66/qmss/package.bld
print ("CC BE opts : " + C66BE.ccOpts.prefix);
print ("***********************************************************");
+/* List of all subdirectories that combine to make the QMSS IPC Transport Package. */
+var subDirectories = [ "example", "device" ];
+
var objList_0 = [
"TransportQmss",
];
/* generate makefiles */
buildLibs(objList_0, undefined, null, arguments);
-Pkg.otherFiles = [ "package.bld" ];
+/* Cycle through all the sub-directories and build all the files */
+for (var i = 0; i < subDirectories.length; i++)
+{
+ /* Load the capsule in the sub directory. */
+ var caps = xdc.loadCapsule (subDirectories[i]+"/Module.xs");
+
+ print ("Building directory " + subDirectories[i]);
+
+ /* Build the capsule. */
+ caps.modBuild();
+
+ /* Package the module.xs files for building via package */
+ Pkg.otherFiles[Pkg.otherFiles.length++] = subDirectories[i]+"/Module.xs";
+}
+
+/* Package the remaining files */
+Pkg.otherFiles[Pkg.otherFiles.length++] = "config.bld";
+Pkg.otherFiles[Pkg.otherFiles.length++] = "package.bld";
+Pkg.otherFiles[Pkg.otherFiles.length++] = "docs/ReleaseNotes_TransportQmss.pdf";
+Pkg.otherFiles[Pkg.otherFiles.length++] = "build/buildlib.xs";
/* include source files in the release package */
Pkg.attrs.exportSrc = true;
index 16a1f1a90d107992463acb0bce7558e84333d07d..012ffce4992895cbd1e92391a7cb6ec1b7d62f0d 100644 (file)
/******************************************************************************\r
- * FILE PURPOSE: QMSS LLD example files.\r
+ * FILE PURPOSE: SRIO IPC Transport example files.\r
******************************************************************************\r
- * FILE NAME: module.xs\r
+ * FILE NAME: Module.xs\r
*\r
* DESCRIPTION: \r
- * This file contains the module specification for QMSS LLD example files.\r
+ * This file contains the module specification for SRIO IPC Transport example\r
+ * files.\r
*\r
- * Copyright (C) 2009, Texas Instruments, Inc.\r
+ * Copyright (C) 2015, Texas Instruments, Inc.\r
*****************************************************************************/\r
\r
/* Load the library utility. */\r
diff --git a/c66/srio/package.bld b/c66/srio/package.bld
index a24b46aadb0e239f21dac50096b1ec53cefe840b..b7b727b04aa04495fb56775d90324eee734f6a2b 100644 (file)
--- a/c66/srio/package.bld
+++ b/c66/srio/package.bld
print ("CC BE opts : " + C66BE.ccOpts.prefix);
print ("***********************************************************");
-/* List of all subdirectories that combine to make the QMSS LLD Package. */
+/* List of all subdirectories that combine to make the SRIO IPC Transport Package. */
var subDirectories = [ "example", "device" ];
var objList_0 = [