]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - keystone-rtos/tcp3d-lld.git/blob - package.bld
Merge pull request #2 in PROCESSOR-SDK/tcp3d-lld from Doc_ver_update_5.0 to master
[keystone-rtos/tcp3d-lld.git] / package.bld
1 /******************************************************************************\r
2  * FILE PURPOSE: Build description for the TCP3D Driver\r
3  ******************************************************************************\r
4  * FILE NAME: package.bld\r
5  *\r
6  * DESCRIPTION: \r
7  *  This file contains the build specification and description for the TCP3D driver\r
8  *  \r
9  *  The file takes the following parameters from the command line through the\r
10  *  XDCARGS variable.\r
11  *      XDCARGS[0] = TCP3D Driver Install Type \r
12  *      Valid Values are "TAR" or "SETUP"\r
13  *      DEFAULT is "TAR"\r
14  *\r
15  *  Example for a valid command:\r
16  *      xdc XDCARGS=SETUP release   \r
17  *\r
18  * Copyright (C) 2011, Texas Instruments, Inc.\r
19  *****************************************************************************/\r
20 \r
21 /* List of all subdirectories that combine to make the TCP3D Driver Package. */\r
22 var subDirectories = [ "src", "docs", "example", "test" ];\r
23 \r
24 /* Determine if we need to create the InstallJammer Application or not? \r
25  * TCP3D Driver deliverables be either of the following formats:\r
26  *  - TAR Ball Package\r
27  *  - Setup Executable \r
28  * DEFAULT is a TAR package. */\r
29 if ((arguments[0] != "TAR") && (arguments[0] != "SETUP"))\r
30     tcp3dDriverInstallType = Pkg.attrs.archiver;\r
31 else\r
32     tcp3dDriverInstallType = arguments[0];\r
33 \r
34 /* Irrespective of the InstallType we always create a TAR Ball Package as a part\r
35  * of the RTSC Build. Here we determine the name of the TAR Ball Package\r
36  *  Format is as follows:\r
37  *      tcp3d_<version> */\r
38 var tcp3dRTSCFileName = "tcp3d" + "_" +\r
39                         tcp3dPartNumber + "_" + \r
40                         tcp3dDriverReleaseVersion[0] + "_" +\r
41                         tcp3dDriverReleaseVersion[1] + "_" + \r
42                         tcp3dDriverReleaseVersion[2] + "_" +\r
43                         tcp3dDriverReleaseVersion[3];\r
44 \r
45 /******************************************************************\r
46  ************************ Release Banner **************************\r
47  ******************************************************************/\r
48 \r
49 print ("************* TCP3D Driver Build Information *************");\r
50 print ("TCP3D Driver Install            : " + tcp3dDriverInstallType);\r
51 print ("TCP3D Driver Version            : " + tcp3dDriverReleaseVersion);\r
52 print ("Tools Directory                 : " + toolsBaseDir);\r
53 print ("RTSC File Name                  : " + tcp3dRTSCFileName);\r
54 print ("TCP3D Driver Path               : " + tcp3dDriverPath);\r
55 print ("CC LE opts                      : " + C66LE.ccOpts.prefix);\r
56 print ("CC BE opts                      : " + C66BE.ccOpts.prefix);\r
57 print ("**********************************************************");\r
58 \r
59 /* Create the release package for the TCP3D Driver */\r
60 Pkg.defaultRelease = Pkg.addRelease (tcp3dRTSCFileName, {prefix: "./packages/"});\r
61 \r
62 /* Cycle through all the sub-directories and build all the files */\r
63 for (var i = 0; i < subDirectories.length; i++) \r
64 {\r
65     /* Load the capsule in the sub directory. */\r
66     var caps = xdc.loadCapsule (subDirectories[i]+"/Module.xs");\r
67 \r
68     print ("Building directory " + subDirectories[i]);\r
69 \r
70     /* Build the capsule. */\r
71     caps.modBuild();\r
72 \r
73     /* Package the module.xs files for building via package */\r
74     Pkg.otherFiles[Pkg.otherFiles.length++] = subDirectories[i]+"/Module.xs";\r
75 }\r
76 \r
77 /* Package the remaining files */\r
78 Pkg.otherFiles[Pkg.otherFiles.length++] = "config.bld";\r
79 Pkg.otherFiles[Pkg.otherFiles.length++] = "package.bld";\r
80 Pkg.otherFiles[Pkg.otherFiles.length++] = "package.xdc";\r
81 Pkg.otherFiles[Pkg.otherFiles.length++] = "package.xs";\r
82 Pkg.otherFiles[Pkg.otherFiles.length++] = "Settings.xdc";\r
83 Pkg.otherFiles[Pkg.otherFiles.length++] = "Settings.xdc.xdt";\r
84 Pkg.otherFiles[Pkg.otherFiles.length++] = "tcp3d_drv.h";\r
85 Pkg.otherFiles[Pkg.otherFiles.length++] = "tcp3d_osal.h";\r
86 Pkg.otherFiles[Pkg.otherFiles.length++] = "tcp3d_drv_types.h";\r
87 Pkg.otherFiles[Pkg.otherFiles.length++] = "tcp3dver.h";\r
88 Pkg.otherFiles[Pkg.otherFiles.length++] = "tcp3dver.h.xdt";\r
89 Pkg.otherFiles[Pkg.otherFiles.length++] = "docs/TCP3D_DRV_doxconfig";\r
90 Pkg.otherFiles[Pkg.otherFiles.length++] = "docs/TCP3D_DRV_doxconfig.xdt";\r
91 Pkg.otherFiles[Pkg.otherFiles.length++] = "build/buildlib.xs";\r
92 Pkg.otherFiles[Pkg.otherFiles.length++] = "makefile";\r
93 \r
94 /* Generate Users Manual Doxyfile */\r
95 var tplt = xdc.loadTemplate("./docs/TCP3D_DRV_doxconfig.xdt");\r
96 tplt.genFile("./docs/TCP3D_DRV_doxconfig",tcp3dDriverReleaseVersion); \r
97 \r
98 /* Generate Settings.xdc */\r
99 var tplt = xdc.loadTemplate("./Settings.xdc.xdt");\r
100 tplt.genFile("./Settings.xdc",tcp3dDriverReleaseVersion); \r
101 \r
102 /* Generate paver.h */\r
103 var tplt = xdc.loadTemplate("./tcp3dver.h.xdt");\r
104 tplt.genFile("./tcp3dver.h",tcp3dDriverReleaseVersion);      \r
105 \r
106 /* Generate eclipse sample file */\r
107 var tplt = xdc.loadTemplate("./docs/eclipse/sample.xml.xdt");\r
108 tplt.genFile("./docs/eclipse/sample.xml",tcp3dDriverReleaseVersion); \r
109 \r
110     \r