index 9df8c0e3287dd050b2264534f1b11519c3372ee7..176c87fbd99ff089d83ccd2aeb89edcd36f4f71a 100755 (executable)
"src/edma3_drv_adv.c",
];
+/* Targets supported */
+var targ_supported = [
+ 'C64P',
+ 'C64P_big_endian',
+ 'C674',
+ 'Arm9',
+ 'A8F',
+ 'C66',
+ 'C66_big_endian',
+ 'M3',
+ ];
+
+/* Directories for each target */
+var dir = [
+ '64p/',
+ '64p/',
+ '674/',
+ 'arm9/',
+ 'a8/',
+ '66/',
+ '66/',
+ 'm3/',
+ ];
+
for each (var targ in Build.targets)
{
/* compile the library only for the default platform otherwise error will
* will be thrown by xdc that library already exists */
var plat = targ.platform;
+ var lib = "lib/";
+ var bool = 0;
+
if (targ.platforms.length == 0)
continue;
-
+
+ for (var i = 0; i < targ_supported.length; i++)
+ {
+ if (java.lang.String(targ.name).equals(targ_supported[i]))
+ {
+ /* Choose the selected target */
+ lib = lib + dir[i];
+ bool = 1;
+ break;
+ }
+ }
+
+ if (bool == 0)
+ throw new Error('Unexpected value in "target" parameter')
+
if (java.lang.String(targ.model.endian).equals("big")) {
- Pkg.addLibrary("lib/Debug/" + Pkg.name, targ,
+ Pkg.addLibrary(lib + "debug/" + Pkg.name, targ,
{ defs:"-DBIG_ENDIAN_MODE", profile: "debug"}
).addObjects(objList);
- Pkg.addLibrary("lib/Release/" + Pkg.name, targ,
+ Pkg.addLibrary(lib + "release/" + Pkg.name, targ,
{ defs:"-DBIG_ENDIAN_MODE", profile: "release"}
).addObjects(objList);
+ benchmark("lib/release/" + Pkg.name, targ);
} else {
- Pkg.addLibrary("lib/Debug/" + Pkg.name, targ,
+ Pkg.addLibrary(lib + "debug/" + Pkg.name, targ,
{ defs:"", profile: "debug"}
).addObjects(objList);
- Pkg.addLibrary("lib/Release/" + Pkg.name, targ,
+ Pkg.addLibrary(lib + "release/" + Pkg.name, targ,
{ defs:"", profile: "release"}
).addObjects(objList);
+ benchmark("lib/release/" + Pkg.name, targ);
}
}
+function benchmark(lldFullLibraryPath, target)
+{
+ /* Create the Epilogue; which executes after all the builds are completed.
+ * This is used to generate the benchmark information for the built library.
+ * Also add the benchmarking information file to the package. */
+ Pkg.makeEpilogue += ".libraries: benchmarking_" + target.suffix + "\n";
+ Pkg.makeEpilogue += "benchmarking_" + target.suffix + ":";
+ Pkg.makeEpilogue += "\n\t ofd6x.exe -x " + lldFullLibraryPath + ".a" + target.suffix + " > tmp.xml";
+ Pkg.makeEpilogue += "\n\t sectti.exe tmp.xml > " + lldFullLibraryPath + ".a" + target.suffix + "_size.txt";
+ Pkg.makeEpilogue += "\n\t $(RM) tmp.xml\n\n";
+ Pkg.otherFiles[Pkg.otherFiles.length++] = lldFullLibraryPath + ".a" + target.suffix + "_size.txt";
+
+ /* We need to clean after ourselves; extend the 'clean' target to take care of this. */
+ Pkg.makeEpilogue += "clean::\n\t";
+ Pkg.makeEpilogue += "$(RM) " + lldFullLibraryPath + ".a" + target.suffix + "_size.txt\n\n";
+}
Pkg.otherFiles=[
'.settings/org.eclipse.cdt.core.prefs',
'docs',
- 'lib/Debug/ti.sdo.edma3.drv.a64P',
- 'lib/Debug/ti.sdo.edma3.drv.a64Pe',
- 'lib/Debug/ti.sdo.edma3.drv.a674',
- 'lib/Release/ti.sdo.edma3.drv.a64P',
- 'lib/Release/ti.sdo.edma3.drv.a64Pe',
- 'lib/Release/ti.sdo.edma3.drv.a674',
+ 'lib/debug/ti.sdo.edma3.drv.a64P',
+ 'lib/debug/ti.sdo.edma3.drv.a64Pe',
+ 'lib/debug/ti.sdo.edma3.drv.a674',
+ 'lib/release/ti.sdo.edma3.drv.a64P',
+ 'lib/release/ti.sdo.edma3.drv.a64Pe',
+ 'lib/release/ti.sdo.edma3.drv.a674',
+ 'lib/debug/ti.sdo.edma3.drv.ae64P',
+ 'lib/debug/ti.sdo.edma3.drv.ae64Pe',
+ 'lib/debug/ti.sdo.edma3.drv.ae674',
+ 'lib/release/ti.sdo.edma3.drv.ae64P',
+ 'lib/release/ti.sdo.edma3.drv.ae64Pe',
+ 'lib/release/ti.sdo.edma3.drv.ae674',
+ 'lib/debug/ti.sdo.edma3.drv.ae66',
+ 'lib/debug/ti.sdo.edma3.drv.ae66e',
+ 'lib/release/ti.sdo.edma3.drv.ae66',
+ 'lib/release/ti.sdo.edma3.drv.ae66e',
+ 'lib/release/ti.sdo.edma3.drv.a64P_size.txt',
+ 'lib/release/ti.sdo.edma3.drv.a64Pe_size.txt',
+ 'lib/release/ti.sdo.edma3.drv.ae64P_size.txt',
+ 'lib/release/ti.sdo.edma3.drv.ae64Pe_size.txt',
+ 'lib/release/ti.sdo.edma3.drv.ae66_size.txt',
+ 'lib/release/ti.sdo.edma3.drv.ae66e_size.txt',
'src',
'.cdtproject',
'.project',