1 /******************************************************************************\r
2 * FILE PURPOSE: GPIO LLD example files.\r
3 ******************************************************************************\r
4 * FILE NAME: module.xs\r
5 *\r
6 * DESCRIPTION: \r
7 * This file contains the module specification for GPIO LLD example files.\r
8 *\r
9 * Copyright (C) 2009, Texas Instruments, Inc.\r
10 *****************************************************************************/\r
11 \r
12 /* Load the library utility. */\r
13 var libUtility = xdc.loadCapsule ("../build/buildlib.xs");\r
14 \r
15 /**************************************************************************\r
16 * FUNCTION NAME : modBuild\r
17 **************************************************************************\r
18 * DESCRIPTION :\r
19 * The function is used to add all the source files in the example \r
20 * directory into the package.\r
21 **************************************************************************/\r
22 function modBuild() \r
23 {\r
24 /* Add all the .c files to the release package. */\r
25 var exampleFiles = libUtility.listAllFiles (".c", "example", true);\r
26 for (var k = 0 ; k < exampleFiles.length; k++)\r
27 Pkg.otherFiles[Pkg.otherFiles.length++] = exampleFiles[k];\r
28 \r
29 /* Add all the .h files to the release package. */\r
30 var exampleFiles = libUtility.listAllFiles (".h", "example", true);\r
31 for (var k = 0 ; k < exampleFiles.length; k++)\r
32 Pkg.otherFiles[Pkg.otherFiles.length++] = exampleFiles[k];\r
33 \r
34 /* Add all the .cmd files to the release package. */\r
35 var exampleFiles = libUtility.listAllFiles (".cmd", "example", true);\r
36 for (var k = 0 ; k < exampleFiles.length; k++)\r
37 Pkg.otherFiles[Pkg.otherFiles.length++] = exampleFiles[k];\r
38 \r
39 /* Add all the .cfg files to the release package. */\r
40 var exampleFiles = libUtility.listAllFiles (".cfg", "example", true);\r
41 for (var k = 0 ; k < exampleFiles.length; k++)\r
42 Pkg.otherFiles[Pkg.otherFiles.length++] = exampleFiles[k];\r
43 \r
44 /* Add all the make files to the release package. */\r
45 var exampleFiles = libUtility.listAllFiles ("makefile", "example", true);\r
46 for (var k = 0 ; k < exampleFiles.length; k++)\r
47 Pkg.otherFiles[Pkg.otherFiles.length++] = exampleFiles[k];\r
48 /* Add the .txt to the package */\r
49 var exampleFiles = libUtility.listAllFiles (".txt", "example", true);\r
50 for (var k = 0 ; k < exampleFiles.length; k++)\r
51 Pkg.otherFiles[Pkg.otherFiles.length++] = exampleFiles[k];\r
52 /* Add all the .mk files to the release package. */\r
53 var mkFiles = libUtility.listAllFiles (".mk", "example", true);\r
54 for (var k = 0 ; k < mkFiles.length; k++)\r
55 Pkg.otherFiles[Pkg.otherFiles.length++] = mkFiles[k];\r
56 \r
57 }\r