summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ab51ad5)
raw | patch | inline | side by side (parent: ab51ad5)
author | Chris Ring <cring@ti.com> | |
Wed, 10 Apr 2013 00:05:55 +0000 (17:05 -0700) | ||
committer | Chris Ring <cring@ti.com> | |
Wed, 10 Apr 2013 04:30:52 +0000 (21:30 -0700) |
Rework some package.bld scripts into more traditional for() loops,
building all targets, all profiles. No functional changes.
building all targets, all profiles. No functional changes.
packages/ti/srvmgr/omaprpc/package.bld | patch | blob | history | |
packages/ti/srvmgr/omx/package.bld | patch | blob | history |
index 11eee466e10df6f0d04f74fb54373d47e17a19f8..24d9490444d389be010f47675f64d1233dabc6eb 100644 (file)
"package.bld"
];
"package.bld"
];
-/* clean lib folder */
-Pkg.generatedFiles.$add("lib/");
-Pkg.libDir = "package/";
-
-/* list of libraries to build */
-var libArray = new Array();
-
-/* omaprpc library for IPU SMP target */
-libArray.push(
- {
- name: "ti.srvmgr.omaprpc_smp",
- sources: [
- "OmapRpc",
- ],
- libAttrs: {
- defs: " -DSMP"
- },
- isas: [ "v7M", "v7M4" ],
- }
-);
-
-/* omaprpc library for regular targets */
-libArray.push(
- {
- name: "ti.srvmgr.omaprpc",
- sources: [
- "OmapRpc",
- ],
- }
-);
-
-/* ==== loop over array of libraries ==== */
-for (var i = 0; i < libArray.length; i++) {
- var lib = libArray[i];
-
- /* ==== loop over all targets in build array ==== */
- for (var j = 0; j < Build.targets.length; j++) {
- var targ = Build.targets[j];
+var SRCS = ["OmapRpc.c"];
- /* skip target if it does not generate code for the given isa */
- if ("isas" in lib) {
- var skipTarget = true;
- var list = "/" + lib.isas.join("/") + "/";
- if (list.match("/" + targ.isa + "/")) {
- skipTarget = false;
- }
- if (skipTarget) continue;
- }
-
- /* ==== loop over all profiles ==== */
- for (var profile in targ.profiles) {
-
- /* name = lib/profile/name.a+suffix */
- var name = "lib/" + profile + "/" + lib.name;
-
- /* pass along library attributes specified in library array */
- var libAttrs = "libAttrs" in lib ? lib.libAttrs : {};
-
- /* must set profile explicitly */
- libAttrs.profile = profile;
-
- /* build the library */
- var library = Pkg.addLibrary(name, targ, libAttrs);
+/* remove this output directory during a clean */
+Pkg.generatedFiles.$add("lib/");
- /* add the source files */
- library.addObjects(lib.sources);
+for (var i = 0; i < Build.targets.length; i++) {
+ var targ = Build.targets[i];
+
+ /* Build for all profiles */
+ for (var profile in targ.profiles) {
+ Pkg.addLibrary("lib/" + profile + "/" + Pkg.name, targ, {
+ profile: profile,
+ }).addObjects(SRCS);
+
+ /* And SMP-enabled libraries for M3 and M4 */
+ if (targ.isa.match(/^v7M(|4)$/)) {
+ Pkg.addLibrary("lib/" + profile + "/" + Pkg.name + "_smp", targ, {
+ profile: profile,
+ defs: " -DSMP"
+ }).addObjects(SRCS);
}
}
}
}
}
}
index 8b6f86b1bf3f7ef43f1dd5d2c54d00dfdaa3dc7a..6f5c1b6234fff9fca12854003da089d01d56901b 100644 (file)
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-
/*
* ======== package.bld ========
/*
* ======== package.bld ========
- *
*/
*/
-/* explicit references to global objects */
var Build = xdc.useModule('xdc.bld.BuildEnvironment');
var Pkg = xdc.useModule('xdc.bld.PackageContents');
var Build = xdc.useModule('xdc.bld.BuildEnvironment');
var Pkg = xdc.useModule('xdc.bld.PackageContents');
-/* add custom files to all releases */
+/*
+ * This package distributes its sources in the default release. This is to
+ * enable better understanding by the customer/field, as well as enable
+ * modification and profiling techniques in the field.
+ */
Pkg.attrs.exportSrc = true;
Pkg.attrs.exportSrc = true;
+
Pkg.otherFiles = [
Pkg.otherFiles = [
- "OmxSrvMgr.c",
"OmxSrvMgr.h",
"package.bld"
];
"OmxSrvMgr.h",
"package.bld"
];
-/* clean lib folder */
-Pkg.generatedFiles.$add("lib/");
-Pkg.libDir = "package/";
+var SRCS = ["OmxSrvMgr.c"];
-/* add custom files to all releases */
-Pkg.attrs.exportSrc = false;
-Pkg.attrs.exportCfg = true;
-
-/* list of libraries to build */
-var libArray = new Array();
-
-/* omx srvmgr library for IPU SMP target */
-libArray.push(
- {
- name: "ti.srvmgr.omx_smp",
- sources: [
- "OmxSrvMgr",
- ],
- libAttrs: {
- defs: " -DSMP"
- },
- isas: [ "v7M", "v7M4" ],
- }
-);
-
-/* omx srvmgr library for regular targets */
-libArray.push(
- {
- name: "ti.srvmgr.omx",
- sources: [
- "OmxSrvMgr",
- ],
- }
-);
-
-/* ==== loop over array of libraries ==== */
-for (var i = 0; i < libArray.length; i++) {
- var lib = libArray[i];
-
- /* ==== loop over all targets in build array ==== */
- for (var j = 0; j < Build.targets.length; j++) {
- var targ = Build.targets[j];
-
- /* skip target if it does not generate code for the given isa */
- if ("isas" in lib) {
- var skipTarget = true;
- var list = "/" + lib.isas.join("/") + "/";
- if (list.match("/" + targ.isa + "/")) {
- skipTarget = false;
- }
- if (skipTarget) continue;
- }
-
- /* ==== loop over all profiles ==== */
- for (var profile in targ.profiles) {
-
- /* name = lib/profile/name.a+suffix */
- var name = "lib/" + profile + "/" + lib.name;
-
- /* pass along library attributes specified in library array */
- var libAttrs = "libAttrs" in lib ? lib.libAttrs : {};
-
- /* must set profile explicitly */
- libAttrs.profile = profile;
-
- /* build the library */
- var library = Pkg.addLibrary(name, targ, libAttrs);
+/* remove this output directory during a clean */
+Pkg.generatedFiles.$add("lib/");
- /* add the source files */
- library.addObjects(lib.sources);
+for (var i = 0; i < Build.targets.length; i++) {
+ var targ = Build.targets[i];
+
+ /* Build for all profiles */
+ for (var profile in targ.profiles) {
+ Pkg.addLibrary("lib/" + profile + "/" + Pkg.name, targ, {
+ profile: profile,
+ }).addObjects(SRCS);
+
+ /* And SMP-enabled libraries for M3 and M4 */
+ if (targ.isa.match(/^v7M(|4)$/)) {
+ Pkg.addLibrary("lib/" + profile + "/" + Pkg.name + "_smp", targ, {
+ profile: profile,
+ defs: " -DSMP"
+ }).addObjects(SRCS);
}
}
}
}
}
}