1 /******************************************************************************
2 * FILE PURPOSE: Build description for the Utilities Tool
3 ******************************************************************************
4 * FILE NAME: package.bld
5 *
6 * DESCRIPTION:
7 * This file contains the build specification and description for the Utilities Tool
8 *
9 * The file takes the following parameters from the command line through the
10 * XDCARGS variable.
11 * XDCARGS[0] = Utilities Install Type
12 * Valid Values are "TAR" or "SETUP"
13 * DEFAULT is "TAR"
14 *
15 * Example for a valid command:
16 * xdc XDCARGS="SETUP" release
17 *
18 * Copyright (C) 2015-2017, Texas Instruments, Inc.
19 *****************************************************************************/
21 /* List of all subdirectories that combine to make the Utilities Package. */
22 var subDirectories = [ "src", "docs", "scripts", "filters" ];
24 var driverInstallType;
26 /* Determine if we need to create the InstallJammer Application or not?
27 * Utilities Deliverables be either of the following formats:
28 * - TAR Ball Package
29 * - Setup Executable
30 * DEFAULT is a SETUP Executable. */
32 if ((arguments[0] != "TAR") && (arguments[0] != "SETUP"))
33 driverInstallType = "TAR";
34 else
35 driverInstallType = arguments[0];
37 /* Irrespective of the InstallType we always create a TAR Ball Package as a part
38 * of the RTSC Build. Here we determine the name of the TAR Ball Package
39 * Format is as follows:
40 * utils_<version> */
41 var utilsRTSCFileName = "utils"+"_"+
42 driverReleaseVersion[0] + "_" + driverReleaseVersion[1] + "_" +
43 driverReleaseVersion[2] + "_" + driverReleaseVersion[3];
45 /******************************************************************
46 ************************ Release Banner **************************
47 ******************************************************************/
49 print ("************* utilities Tool Build Information *************");
50 print ("Utilities Tool Install : " + driverInstallType);
51 print ("Utilities Tool Version : " + driverReleaseVersion);
52 print ("RTSC File Name : " + utilsRTSCFileName);
53 print ("Utilities Tool Path : " + driverPath);
54 print ("C66 Tools Directory : " + c66ToolsBaseDir);
55 print ("M4 Tools Directory : " + m4ToolsBaseDir);
56 print ("A15 Tools Directory : " + a15ToolsBaseDir);
57 if (pOpts == 1)
58 {
59 print ("CC LE opts : " + C66LE.ccOpts.prefix);
60 print ("CC BE opts : " + C66BE.ccOpts.prefix);
61 print ("M4 LE opts : " + M4LE.ccOpts.prefix);
62 print ("A15 basic opts : " + A15LE.ccOpts.prefix);
63 }
64 print ("************************************************************");
66 /* Create the release package for the Utilities Tool */
67 Pkg.defaultRelease = Pkg.addRelease (utilsRTSCFileName, {prefix: "./packages/"});
69 /* Moving forward we need to set the Archiver of the package to be ZIP. This is currently
70 * not supported in the XDC tools being used. Currenly builds need to be done with the
71 * following options:-
72 * xdc MK_FIXLISTOPTS=-t release
73 * ZIP is a better option as it works natively with INSTALL Jammer and we can remove the
74 * uncompression into a temporary directory. XDC Tools with xdc-rXX support the ZIP archiver. */
75 //Pkg.attrs = {archiver : "zip"};
77 /* Cycle through all the sub-directories and build all the files */
78 for (var i = 0; i < subDirectories.length; i++)
79 {
80 /* Load the capsule in the sub directory. */
81 var caps = xdc.loadCapsule (subDirectories[i]+"/Module.xs");
83 print ("Building directory " + subDirectories[i]);
85 /* Build the capsule. */
86 caps.modBuild();
88 /* Package the module.xs files for building via package */
89 Pkg.otherFiles[Pkg.otherFiles.length++] = subDirectories[i]+"/Module.xs";
90 }
92 /* Package the remaining files */
93 Pkg.otherFiles[Pkg.otherFiles.length++] = "config.bld";
94 Pkg.otherFiles[Pkg.otherFiles.length++] = "config_mk.bld";
95 Pkg.otherFiles[Pkg.otherFiles.length++] = "package.bld";
96 Pkg.otherFiles[Pkg.otherFiles.length++] = "Settings.xdc";
97 Pkg.otherFiles[Pkg.otherFiles.length++] = "Settings.xdc.xdt";
98 Pkg.otherFiles[Pkg.otherFiles.length++] = "docs/Doxyfile";
99 Pkg.otherFiles[Pkg.otherFiles.length++] = "docs/doxyfile.xdt";
100 Pkg.otherFiles[Pkg.otherFiles.length++] = "build/buildlib.xs";
101 Pkg.otherFiles[Pkg.otherFiles.length++] = "makefile";
102 Pkg.otherFiles[Pkg.otherFiles.length++] = "scripts";
103 Pkg.otherFiles[Pkg.otherFiles.length++] = "profilingHooks.h";
104 Pkg.otherFiles[Pkg.otherFiles.length++] = "profiling_osal.h";
105 Pkg.otherFiles[Pkg.otherFiles.length++] = "profilingver.h";
106 Pkg.otherFiles[Pkg.otherFiles.length++] = "profilingver.h.xdt";
107 Pkg.otherFiles[Pkg.otherFiles.length++] = "README.dox";
108 Pkg.otherFiles[Pkg.otherFiles.length++] = "build/makefile_profile.mk";
109 Pkg.otherFiles[Pkg.otherFiles.length++] = "profiling_component.mk";
110 Pkg.otherFiles[Pkg.otherFiles.length++] = "./lib";
112 /* Generate Users Manual Doxyfile */
113 var tplt = xdc.loadTemplate("./docs/doxyfile.xdt");
114 tplt.genFile("./docs/Doxyfile",driverReleaseVersion);
116 /* Generate Settings.xdc */
117 var tplt = xdc.loadTemplate("./Settings.xdc.xdt");
118 tplt.genFile("./Settings.xdc",driverReleaseVersion);
120 /* Generate paver.h */
121 var tplt = xdc.loadTemplate("./profilingver.h.xdt");
122 tplt.genFile("./profilingver.h",driverReleaseVersion);