diff --git a/packages/ti/sdo/ipc/family/ti81xx/package.xs b/packages/ti/sdo/ipc/family/ti81xx/package.xs
index 7c16ec14706938f917424fdfeeeb7cf400674b81..a4024b7f8bd26708c98bf5adbedcb0bd9ce98a90 100644 (file)
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+
/*
* ======== package.xs ========
+ *
*/
+var Build = null;
+
+/*
+ * ======== package.close ========
+ */
+function close()
+{
+ if (xdc.om.$name != 'cfg') {
+ return;
+ }
+
+ Build = xdc.useModule('ti.sdo.ipc.Build');
+}
+
+/*
+ * ======== Package.getLibs ========
+ * This function is called when a program's configuration files are
+ * being generated and it returns the name of a library appropriate
+ * for the program's configuration.
+ */
+function getLibs(prog)
+{
+ var BIOS = xdc.module('ti.sysbios.BIOS');
+ var libPath;
+ var suffix;
+
+ if (Build.libType == Build.LibType_PkgLib) {
+ /* lib path defined in Build.buildLibs() */
+ libPath = (BIOS.smpEnabled ? "lib/smpipc/debug" : "lib/ipc/debug");
+
+ /* find a compatible suffix */
+ if ("findSuffix" in prog.build.target) {
+ suffix = prog.build.target.findSuffix(this);
+ }
+ else {
+ suffix = prog.build.target.suffix;
+ }
+ return (libPath + "/" + this.$name + ".a" + suffix);
+ }
+ else {
+ return (Build.getLibs(this));
+ }
+}
/*
* ======== Package.validate ========
*/
}
}
}
-
-/*
- * ======== Package.getLibs ========
- * This function is called when a program's configuration files are
- * being generated and it returns the name of a library appropriate
- * for the program's configuration.
- */
-function getLibs(prog)
-{
- var Build = xdc.module("ti.sdo.ipc.Build");
-
- /* use shared getLibs() */
- return (Build.getLibs(this));
-}
-
-/*
- * ======== package.close ========
- */
-function close()
-{
- if (xdc.om.$name != 'cfg') {
- return;
- }
-}