]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - processor-sdk/pdk.git/blob - packages/ti/drv/hyplnk/package.bld
hypnlk-lld: add to PDK
[processor-sdk/pdk.git] / packages / ti / drv / hyplnk / package.bld
1 /******************************************************************************\r
2  * FILE PURPOSE: Build description for the hyplnk LLD Package\r
3  ******************************************************************************\r
4  * FILE NAME: package.bld\r
5  *\r
6  * DESCRIPTION: \r
7  *  This file contains the build specification and description for hyplnk LLD\r
8  *  \r
9  *  The file takes the following parameters from the command line through the\r
10  *  XDCARGS variable.\r
11  *      XDCARGS[0] = hyplnk LLD Install Type \r
12  *      Valid Values are "TAR" or "SETUP"\r
13  *      DEFAULT is "SETUP"\r
14  *\r
15  *  Example for a valid command:\r
16  *      xdc XDCARGS="SETUP" release  \r
17  *\r
18  * Copyright (C) 2012, Texas Instruments, Inc.\r
19  *****************************************************************************/\r
20 \r
21 /* List of all subdirectories that combine to make the hyplnk LLD Package. */\r
22 var subDirectories = [ "src", "docs", "example" , "device"];\r
23 \r
24 var hyplnkLldInstallType;\r
25 \r
26 /* Check if we need to create the Makefiles? */\r
27 var miniBuild = java.lang.System.getenv("MINI_PACKAGE");\r
28 \r
29 /* Determine if we need to create the InstallJammer Application or not? \r
30  * hyplnk LLD Deliverables be either of the following formats:\r
31  *  - TAR Ball Package\r
32  *  - Setup Executable \r
33  * DEFAULT is a SETUP Executable. */\r
34 \r
35 if ((arguments[0] != "TAR") && (arguments[0] != "SETUP"))\r
36     hyplnklldInstallType = "TAR";\r
37 else\r
38     hyplnklldInstallType = arguments[0];\r
39 \r
40 /* Irrespective of the InstallType we always create a TAR Ball Package as a part\r
41  * of the RTSC Build. Here we determine the name of the TAR Ball Package\r
42  *  Format is as follows:\r
43  *      hyplnklld_<version> */\r
44 var hyplnklldRTSCFileName = "hyplnklld" + "_" + \r
45                             hyplnklldPartNumber + "_" +\r
46                             hyplnklldReleaseVersion[0] + "_" +  \r
47                             hyplnklldReleaseVersion[1] + "_" + \r
48                             hyplnklldReleaseVersion[2]  + "_" + \r
49                             hyplnklldReleaseVersion[3];\r
50 \r
51 /******************************************************************\r
52  ************************ Release Banner **************************\r
53  ******************************************************************/\r
54 \r
55 print ("************* hyplnk LLD Build Information *************");\r
56 print ("hyplnk LLD Install         : " + hyplnklldInstallType);\r
57 print ("hyplnk LLD Version         : " + hyplnklldReleaseVersion);\r
58 print ("Tools Directory            : " + toolsBaseDir);\r
59 print ("RTSC File Name             : " + hyplnklldRTSCFileName);\r
60 print ("hyplnk LLD Path            : " + hyplnklldPath);\r
61 print ("C66 LE opts                : " + C66LE.ccOpts.prefix);\r
62 print ("***********************************************************");\r
63 \r
64 /* Create the release package for the hyplnk LLD */\r
65 Pkg.defaultRelease = Pkg.addRelease (hyplnklldRTSCFileName, {prefix: "./packages/"});\r
66 \r
67 /* Moving forward we need to set the Archiver of the package to be ZIP. This is currently\r
68  * not supported in the XDC tools being used. Currenly builds need to be done with the \r
69  * following options:-\r
70  *   xdc MK_FIXLISTOPTS=-t release \r
71  * ZIP is a better option as it works natively with INSTALL Jammer and we can remove the\r
72  * uncompression into a temporary directory. XDC Tools with xdc-rXX support the ZIP archiver. */\r
73 //Pkg.attrs = {archiver : "zip"};\r
74 \r
75 /* Cycle through all the sub-directories and build all the files */\r
76 for (var i = 0; i < subDirectories.length; i++) \r
77 {\r
78     /* Load the capsule in the sub directory. */\r
79     var caps = xdc.loadCapsule (subDirectories[i]+"/Module.xs");\r
80 \r
81     print ("Building directory " + subDirectories[i]);\r
82 \r
83     /* Build the capsule. */\r
84     caps.modBuild();\r
85 \r
86     /* Package the module.xs files for building via package */\r
87     Pkg.otherFiles[Pkg.otherFiles.length++] = subDirectories[i]+"/Module.xs";\r
88 }\r
89 \r
90 /* Package the remaining files */\r
91 Pkg.otherFiles[Pkg.otherFiles.length++] = "config.bld";\r
92 Pkg.otherFiles[Pkg.otherFiles.length++] = "package.bld";\r
93 Pkg.otherFiles[Pkg.otherFiles.length++] = "package.xdc";\r
94 Pkg.otherFiles[Pkg.otherFiles.length++] = "package.xs";\r
95 Pkg.otherFiles[Pkg.otherFiles.length++] = "Settings.xdc";\r
96 Pkg.otherFiles[Pkg.otherFiles.length++] = "Settings.xdc.xdt";\r
97 Pkg.otherFiles[Pkg.otherFiles.length++] = "hyplnk.h";\r
98 Pkg.otherFiles[Pkg.otherFiles.length++] = "hyplnk_cfg.h";\r
99 Pkg.otherFiles[Pkg.otherFiles.length++] = "hyplnkver.h";\r
100 Pkg.otherFiles[Pkg.otherFiles.length++] = "hyplnkver.h.xdt";\r
101 Pkg.otherFiles[Pkg.otherFiles.length++] = "src/hyplnkloc.h";\r
102 Pkg.otherFiles[Pkg.otherFiles.length++] = "docs/Doxyfile";\r
103 Pkg.otherFiles[Pkg.otherFiles.length++] = "docs/doxyfile.xdt";\r
104 Pkg.otherFiles[Pkg.otherFiles.length++] = "build/buildlib.xs";\r
105 Pkg.otherFiles[Pkg.otherFiles.length++] = "makefile";\r
106 Pkg.otherFiles[Pkg.otherFiles.length++] = "makefile_armv7";\r
107 Pkg.otherFiles[Pkg.otherFiles.length++] = "build/armv7/libhyplnk_aearmv7.mk";\r
108 Pkg.otherFiles[Pkg.otherFiles.length++] = "example/memoryMappedExample/k2h/armv7/linux/build/makefile";\r
109 Pkg.otherFiles[Pkg.otherFiles.length++] = "example/memoryMappedExample/k2k/armv7/linux/build/makefile";\r
110 Pkg.otherFiles[Pkg.otherFiles.length++] = "example/memoryMappedExample/k2e/armv7/linux/build/makefile";\r
111 Pkg.otherFiles[Pkg.otherFiles.length++] = "example/cicInterruptExample/k2h/armv7/linux/build/makefile";\r
112 Pkg.otherFiles[Pkg.otherFiles.length++] = "example/cicInterruptExample/k2k/armv7/linux/build/makefile";\r
113 Pkg.otherFiles[Pkg.otherFiles.length++] = "example/cicInterruptExample/k2e/armv7/linux/build/makefile";\r
114 \r
115 /* Generate Users Manual Doxyfile */\r
116 var tplt = xdc.loadTemplate("./docs/doxyfile.xdt");\r
117 tplt.genFile("./docs/Doxyfile",hyplnklldReleaseVersion); \r
118 \r
119 /* Generate Settings.xdc */\r
120 var tplt = xdc.loadTemplate("./Settings.xdc.xdt");\r
121 tplt.genFile("./Settings.xdc",hyplnklldReleaseVersion); \r
122 \r
123 /* Generate paver.h */\r
124 var tplt = xdc.loadTemplate("./hyplnkver.h.xdt");\r
125 tplt.genFile("./hyplnkver.h",hyplnklldReleaseVersion);      \r
126 \r
127     \r