]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - ipc/ipcdev.git/blob - src/ti/sdo/ipc/package.bld
Rename: Renamed packages to src to allow application of ipc-j tree commits.
[ipc/ipcdev.git] / src / ti / sdo / ipc / package.bld
1 /*
2  * Copyright (c) 2010-2013, Texas Instruments Incorporated
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions
7  * are met:
8  *
9  * *  Redistributions of source code must retain the above copyright
10  *    notice, this list of conditions and the following disclaimer.
11  *
12  * *  Redistributions in binary form must reproduce the above copyright
13  *    notice, this list of conditions and the following disclaimer in the
14  *    documentation and/or other materials provided with the distribution.
15  *
16  * *  Neither the name of Texas Instruments Incorporated nor the names of
17  *    its contributors may be used to endorse or promote products derived
18  *    from this software without specific prior written permission.
19  *
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31  */
33 /*
34  *  ======== package.bld ========
35  */
37 var IpcBuild = xdc.loadCapsule("ti/sdo/ipc/Build.xs");
39 var objList = [
40       "Notify",
41       "GateMP",
42       "Ipc",
43       "MessageQ",
44       "SharedRegion",
45       "ListMP",
46 ];
48 /* generate makefiles */
49 IpcBuild.buildLibs(objList, undefined, null, arguments);
51 /* generate smp makefiles */
52 IpcBuild.buildLibs(objList, undefined, null, ["profile=smp"]);
54 Pkg.otherFiles = [
55     "package.bld",
56     "linkcmd.xdt",
57     "_GateMP.h",
58     "_ListMP.h",
59     "_Notify.h",
60     "_MessageQ.h",
61     "_SharedRegion.h",
62     "_Ipc.h",
63     "Ipc.c",
64     "makefile.xdt",
65     "makefile_gccArmLto.xdt",
66     "instrumented.cfg.xs", "nonInstrumented.cfg.xs",
67     "instrumented.cfg", "nonInstrumented.cfg",
68     "smpInstrumented.cfg", "smpNonInstrumented.cfg",
69 ];
71 var testArray = [
72     {   name: 'instrumented',
73         config: "instrumented",
74         libdir: "instrumented",
75     },
76     {   name: 'nonInstrumented',
77         config: "nonInstrumented",
78         libdir: "nonInstrumented",
79     },
80 ];
82 /* Build non-SMP pre-built libs */
83 for each (var targ in Build.targets) {
85     /* For each test... */
86     for each (var test in testArray) {
88         var platform = test.platform ? test.platform : targ.platform;
90         var cfg = Pkg.addConfiguration(test.name,
91                                         targ, platform, {
92                                         cfgScript: test.config,
93                                         prelink: false,
94                                         profile: "release",
95                                         exportCfg: false,
96                                         exportSrc: false,
97                                      });
99         var myLib = "lib/ipc/"
100                 + test.libdir + "/ipc.a" + targ.suffix;
102         Pkg.otherFiles[Pkg.otherFiles.length++] = myLib;
103     }
106 var smpTestArray = [
107     {   name: 'smpInstrumented',
108         config: "smpInstrumented",
109         libdir: "instrumented",
110     },
111     {   name: 'smpNonInstrumented',
112         config: "smpNonInstrumented",
113         libdir: "nonInstrumented",
114     },
115 ];
117 /* Build SMP pre-built libs */
118 for each (var targ in Build.targets) {
120     if (targ.profiles["smp"] === undefined) continue;
122     /* For each test... */
123     for each (var test in smpTestArray) {
124         var platform = test.platform ? test.platform : targ.platform;
126         var cfg = Pkg.addConfiguration(test.name,
127                                         targ, platform, {
128                                         cfgScript: test.config,
129                                         prelink: false,
130                                         profile: "release",
131                                         exportCfg: false,
132                                         exportSrc: false,
133                                      });
135         var myLib = "lib/smpipc/"
136                 + test.libdir + "/ipc.a" + targ.suffix;
138         Pkg.otherFiles[Pkg.otherFiles.length++] = myLib;
139     }
142 /* include source files in the release package */
143 Pkg.attrs.exportSrc = true;
144 Pkg.attrs.exportCfg = true;
146 Pkg.generatedFiles.$add("lib/");
147 Pkg.generatedFiles.$add("custom/");