]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - processor-sdk/pdk.git/blob - packages/ti/drv/gpio/package.bld
gpio-lld: add to PDK
[processor-sdk/pdk.git] / packages / ti / drv / gpio / package.bld
1 /******************************************************************************\r
2  * FILE PURPOSE: Build description for the gpio 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 gpio 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] = Driver 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) 2014-2015, Texas Instruments, Inc.\r
19  *****************************************************************************/\r
20 \r
21 /* List of all subdirectories that combine to make the gpio Socket Driver Package. */\r
22 var subDirectories = [ "src", "docs", "test", "example", "soc" ];\r
23 \r
24 var driverInstallType;\r
25 \r
26 /* Determine if we need to create the InstallJammer Application or not? \r
27  * gpio LLD Deliverables be either of the following formats:\r
28  *  - TAR Ball Package\r
29  *  - Setup Executable \r
30  * DEFAULT is a SETUP Executable. */\r
31 \r
32 if ((arguments[0] != "TAR") && (arguments[0] != "SETUP"))\r
33     driverInstallType = "TAR";\r
34 else\r
35     driverInstallType = arguments[0];\r
36 \r
37 /* Irrespective of the InstallType we always create a TAR Ball Package as a part\r
38  * of the RTSC Build. Here we determine the name of the TAR Ball Package\r
39  *  Format is as follows:\r
40  *      gpio_<version> */\r
41 var gpioRTSCFileName = "gpio" + "_"  + \r
42                       driverReleaseVersion[0] + "_" +  driverReleaseVersion[1] + "_" + \r
43                       driverReleaseVersion[2]  + "_" + driverReleaseVersion[3];\r
44 \r
45 /******************************************************************\r
46  ************************ Release Banner **************************\r
47  ******************************************************************/\r
48 \r
49 print ("************* gpio Socket Driver Build Information *************");\r
50 print ("gpio Socket Driver Install      : " + driverInstallType);\r
51 print ("gpio Socket Driver LLD Version  : " + driverReleaseVersion);\r
52 print ("RTSC File Name                  : " + gpioRTSCFileName);\r
53 print ("gpio Socket Driver LLD Path     : " + driverPath);\r
54 print ("C66 Tools Directory             : " + c66ToolsBaseDir);\r
55 print ("M4 Tools Directory              : " + m4ToolsBaseDir);\r
56 print ("A15 Tools Directory             : " + a15ToolsBaseDir);\r
57 if (pOpts == 1) \r
58 {       \r
59         print ("CC LE opts                      : " + C66LE.ccOpts.prefix);\r
60         print ("CC BE opts                      : " + C66BE.ccOpts.prefix);\r
61         print ("M4 LE opts                      : " + M4LE.ccOpts.prefix);\r
62         print ("A15 basic opts                  : " + A15LE.ccOpts.prefix);\r
63 }\r
64 print ("****************************************************************");\r
65 \r
66 /* Create the release package for the gpio LLD */\r
67 Pkg.defaultRelease = Pkg.addRelease (gpioRTSCFileName, {prefix: "./packages/"});\r
68 \r
69 /* Moving forward we need to set the Archiver of the package to be ZIP. This is currently\r
70  * not supported in the XDC tools being used. Currenly builds need to be done with the \r
71  * following options:-\r
72  *   xdc MK_FIXLISTOPTS=-t release \r
73  * ZIP is a better option as it works natively with INSTALL Jammer and we can remove the\r
74  * uncompression into a temporary directory. XDC Tools with xdc-rXX support the ZIP archiver. */\r
75 //Pkg.attrs = {archiver : "zip"};\r
76 \r
77 /* Cycle through all the sub-directories and build all the files */\r
78 for (var i = 0; i < subDirectories.length; i++) \r
79 {\r
80     /* Load the capsule in the sub directory. */\r
81     var caps = xdc.loadCapsule (subDirectories[i]+"/Module.xs");\r
82 \r
83     print ("Building directory " + subDirectories[i]);\r
84 \r
85     /* Build the capsule. */\r
86     caps.modBuild();\r
87 \r
88     /* Package the module.xs files for building via package */\r
89     Pkg.otherFiles[Pkg.otherFiles.length++] = subDirectories[i]+"/Module.xs";\r
90 }\r
91 \r
92 /* Package the remaining files */\r
93 Pkg.otherFiles[Pkg.otherFiles.length++] = "config.bld";\r
94 Pkg.otherFiles[Pkg.otherFiles.length++] = "config_mk.bld";\r
95 Pkg.otherFiles[Pkg.otherFiles.length++] = "package.bld";\r
96 Pkg.otherFiles[Pkg.otherFiles.length++] = "package.xdc";\r
97 Pkg.otherFiles[Pkg.otherFiles.length++] = "package.xs";\r
98 Pkg.otherFiles[Pkg.otherFiles.length++] = "Settings.xdc";\r
99 Pkg.otherFiles[Pkg.otherFiles.length++] = "Settings.xdc.xdt";\r
100 Pkg.otherFiles[Pkg.otherFiles.length++] = "GPIO.h";\r
101 Pkg.otherFiles[Pkg.otherFiles.length++] = "GPIOver.h";\r
102 Pkg.otherFiles[Pkg.otherFiles.length++] = "GPIOver.h.xdt";\r
103 Pkg.otherFiles[Pkg.otherFiles.length++] = "docs/Doxyfile";\r
104 Pkg.otherFiles[Pkg.otherFiles.length++] = "docs/doxyfile.xdt";\r
105 Pkg.otherFiles[Pkg.otherFiles.length++] = "build/buildlib.xs";\r
106 Pkg.otherFiles[Pkg.otherFiles.length++] = "makefile";\r
107 Pkg.otherFiles[Pkg.otherFiles.length++] = "build/makefile.mk";\r
108 Pkg.otherFiles[Pkg.otherFiles.length++] = "build/makefile_indp.mk";\r
109 Pkg.otherFiles[Pkg.otherFiles.length++] = "build/makefile_profile_indp.mk";\r
110 Pkg.otherFiles[Pkg.otherFiles.length++] = "build/makefile_profile.mk";\r
111 Pkg.otherFiles[Pkg.otherFiles.length++] = "src/src_files_common.mk";\r
112 Pkg.otherFiles[Pkg.otherFiles.length++] = "gpio_component.mk";\r
113 Pkg.otherFiles[Pkg.otherFiles.length++] = "./lib";\r
114 \r
115 /* Generate Users Manual Doxyfile */\r
116 var tplt = xdc.loadTemplate("./docs/doxyfile.xdt");\r
117 tplt.genFile("./docs/Doxyfile",driverReleaseVersion); \r
118 \r
119 /* Generate Settings.xdc */\r
120 var tplt = xdc.loadTemplate("./Settings.xdc.xdt");\r
121 tplt.genFile("./Settings.xdc",driverReleaseVersion); \r
122 \r
123 /* Generate paver.h */\r
124 var tplt = xdc.loadTemplate("./GPIOver.h.xdt");\r
125 tplt.genFile("./GPIOver.h",driverReleaseVersion);      \r
126 \r
127     \r