1 /******************************************************************************\r
2 * FILE PURPOSE: TCP3D Driver Source Module specification file.\r
3 ******************************************************************************\r
4 * FILE NAME: module.xs\r
5 *\r
6 * DESCRIPTION: \r
7 * This file contains the module specification for the TCP3D Driver\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 /* List of all the TCP3D Files for library building */\r
16 var tcp3dLibFiles = [\r
17 "src/tcp3d_drv.c",\r
18 "src/tcp3d_reg.c",\r
19 "src/tcp3d_utils.c",\r
20 "src/tcp3d_betaState.c",\r
21 ];\r
22 \r
23 var devicesCCOpt = [ " -DDEVICE_K2K" ];\r
24 \r
25 /* Other files for packaging */\r
26 var tcp3dOtherFiles = [\r
27 "src/tcp3d_drv_priv.h",\r
28 "src/tcp3d_utils.h",\r
29 ];\r
30 \r
31 /**************************************************************************\r
32 * FUNCTION NAME : modBuild\r
33 **************************************************************************\r
34 * DESCRIPTION :\r
35 * The function is used to build the TCP3D Driver and to add the core\r
36 * driver files to the package. \r
37 **************************************************************************/\r
38 function modBuild() \r
39 {\r
40 /* Build the libraries for all the targets specified. */\r
41 for (var targets=0; targets < Build.targets.length; targets++)\r
42 {\r
43 var libOptions = { \r
44 incs: tcp3dIncludePath, \r
45 copts: devicesCCOpt,\r
46 };\r
47 \r
48 libUtility.buildLibrary (libOptions, Pkg.name, Build.targets[targets], tcp3dLibFiles);\r
49 }\r
50 \r
51 /* Add all the .c files to the release package. */\r
52 for (var k = 0 ; k < tcp3dLibFiles.length; k++)\r
53 Pkg.otherFiles[Pkg.otherFiles.length++] = tcp3dLibFiles[k];\r
54 \r
55 /* Add all the .h files to the release package. */\r
56 for (var k = 0 ; k < tcp3dOtherFiles.length; k++)\r
57 Pkg.otherFiles[Pkg.otherFiles.length++] = tcp3dOtherFiles[k];\r
58 }\r
59 \r