diff --git a/build/buildlib.xs b/build/buildlib.xs
index d661fe51b3bea294d6d3aa0b740ff002393174a2..2b22f5b49d3995a7ccd8dac56744a069595cc36a 100644 (file)
--- a/build/buildlib.xs
+++ b/build/buildlib.xs
makefile.writeLine("\n# Output for prebuilt generated libraries");
makefile.writeLine("export LIBDIR ?= ./lib");
+ /* use sectti.exe from path */
+ makefile.writeLine("export SECTTI ?= sectti");
/* Create INCDIR from XDCPATH */
/* 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 -x " + lldFullLibraryPath + ".a" + target.suffix + " > tmp.xml";
- Pkg.makeEpilogue += "\n\t sectti tmp.xml > " + lldFullLibraryPath + ".a" + target.suffix + "_size.txt";
- Pkg.makeEpilogue += "\n\t $(RM) tmp.xml\n\n";
+
+ /* Put the temp file in object directory since javascript doesn't have a built in tmpname,
+ * and don't want --jobs=# with # > 1 to result in collisions */
+ var libFullName = lldFullLibraryPath + ".a" + target.suffix;
+ var tempFile = libFullName + ".xml";
+ Pkg.makeEpilogue += "\n\t $(C6X_GEN_INSTALL_PATH)/bin/ofd6x -x " + libFullName + " > " + tempFile;
+ Pkg.makeEpilogue += "\n\t $(SECTTI) " + tempFile + " > " + libFullName + "_size.txt";
+ Pkg.makeEpilogue += "\n\t $(RM) " + tempFile + "\n\n";
Pkg.otherFiles[Pkg.otherFiles.length++] = lldFullLibraryPath + ".a" + target.suffix + "_size.txt";
Pkg.otherFiles[Pkg.otherFiles.length++] = lldFullLibraryPath + ".a" + target.suffix + ".mk";