PRSDK-3513 Modified xs file to build.
[keystone-rtos/mcbsp-lld.git] / build / buildlib.xs
index 657617046628337ea529bc0c30cc575b05aba2c7..779aa9fe9668774b2e8bc56cf1fac98344bf6be6 100755 (executable)
@@ -224,43 +224,43 @@ function createLibMake(device, makelibname,targetname, objectPath)
     case String(C66LE):
       tooldir="C6X_GEN_INSTALL_PATH";
       cmdprefix="";
-      targetDir="c66";
+      targetDir="c66/release";
       targetname=C66LE;
       break;
     case String(C66BE):
       tooldir="C6X_GEN_INSTALL_PATH";
       cmdprefix="";
-      targetDir="c66";
+      targetDir="c66/release";
       targetname=C66BE;
       break;
     case String(A15LE):
       tooldir="TOOLCHAIN_PATH_A15"; 
       cmdprefix="CROSS_TOOL_PRFX";
-      targetDir="armv7";
+      targetDir="a15/release";
       targetname=A15LE;
       break;
     case String(A9LE):
       tooldir="TOOLCHAIN_PATH_A9";
       cmdprefix="CROSS_TOOL_PRFX";
-      targetDir="armv7";
+      targetDir="a9/release";
       targetname=A9LE;
       break;
     case String(A8LE):
       tooldir="TOOLCHAIN_PATH_A8";
       cmdprefix="CROSS_TOOL_PRFX";
-      targetDir="armv7";
+      targetDir="a8/release";
       targetname=A8LE;
       break;
     case String(M4LE):
       tooldir="TOOLCHAIN_PATH_M4";
       cmdprefix="";
-      targetDir="m4";
+      targetDir="m4/release";
       targetname=M4LE;
       break;
     case String(C674LE):
       tooldir="C6X_GEN_INSTALL_PATH";
       cmdprefix="";
-      targetDir="c674";
+      targetDir="c674/release";
       targetname=C674LE;
       break;
 
@@ -319,7 +319,7 @@ function createLibMake(device, makelibname,targetname, objectPath)
         libmakefile.writeLine("LNKFLAGS_INTERNAL = " +targetname.lnk.opts);
         libmakefile.writeLine("INTERNALDEFS = -MD -MF $@.dep");
         libmakefile.writeLine("INTERNALLINKDEFS = -o $@ -m $@.map");  /* TBD */
-        libmakefile.writeLine("OBJDIR =  $(LIBDIR)/" + device.toString() + "/" + targetDir +"/obj"); 
+        libmakefile.writeLine("OBJDIR =  ./obj/obj_" +targetname.suffix +"/" + device.toString() + "/" + targetDir +"/obj" + "/" + objExtDir); 
     
     }
     else
@@ -360,8 +360,8 @@ function createLibMake(device, makelibname,targetname, objectPath)
         /* libmakefile.writeLine("INTERNALDEFS = -D"+stringname.replace(/\./g,"_")+" -Dxdc_target_types__=ti/targets/std.h -DMAKEFILE_BUILD -eo.$(OBJEXT) -ea.$(AOBJEXT) -fr=$(@D) -fs=$(@D) -ppa -ppd=$@.dep");*/
         libmakefile.writeLine("INTERNALDEFS = -D"+stringname.replace(/\./g,"_")+"  -DMAKEFILE_BUILD -eo.$(OBJEXT) -ea.$(AOBJEXT) -fr=$(@D) -fs=$(@D) -ppa -ppd=$@.dep");
         libmakefile.writeLine("INTERNALLINKDEFS = -o $@ -m $@.map");
-        libmakefile.writeLine("OBJDIR =  $(LIBDIR)/" + device.toString() + "/" + targetDir +"/obj"); 
-    }   
+        libmakefile.writeLine("OBJDIR =  ./obj/obj_" +targetname.suffix +"/" + device.toString() + "/" + targetDir +"/obj" + "/" + objExtDir); 
+    }
    
  return libmakefile;
 
@@ -467,19 +467,19 @@ function buildLibrary (socName, isSoc, libOptions, libName, target, libFiles)
     
     if (target.name == "A15F")
     {
-        targetDir = "armv7";
+        targetDir = "a15/release";
     }
     else if (target.name == "A9F")
     {
-        targetDir = "armv7";
+        targetDir = "a9/release";
     }
     else if (target.name == "A8F")
     {
-        targetDir = "armv7";
+        targetDir = "a8/release";
     }
     else if (target.name == "M4")
     {
-        targetDir = "m4";
+        targetDir = "m4/release";
     }
        else if (target.name == "C674")
     {