From: Sinthu Raja M Date: Thu, 26 Apr 2018 07:16:03 +0000 (+0530) Subject: PRSDK-3513 Modified xs file to build. X-Git-Tag: DEV.MCBSP_LLD.1.00.00.10~5^2 X-Git-Url: https://git.ti.com/gitweb?p=keystone-rtos%2Fmcbsp-lld.git;a=commitdiff_plain;h=a6524a7cf6ad1f4f482f555400ba819866501440 PRSDK-3513 Modified xs file to build. Modified xs files to build error free in nightly builds --- diff --git a/build/buildlib.xs b/build/buildlib.xs index 6576170..779aa9f 100755 --- a/build/buildlib.xs +++ b/build/buildlib.xs @@ -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") { diff --git a/example/Module.xs b/example/Module.xs index 7444a0a..1e2f246 100644 --- a/example/Module.xs +++ b/example/Module.xs @@ -50,4 +50,9 @@ function modBuild() var exampleFiles = libUtility.listAllFiles (".txt", "example", true); for (var k = 0 ; k < exampleFiles.length; k++) Pkg.otherFiles[Pkg.otherFiles.length++] = exampleFiles[k]; + + /* Add all the .mk files to the release package. */ + var mkFiles = libUtility.listAllFiles (".mk", "example", true); + for (var k = 0 ; k < mkFiles.length; k++) + Pkg.otherFiles[Pkg.otherFiles.length++] = mkFiles[k]; } diff --git a/include/Module.xs b/include/Module.xs index 388e2f6..8faf45a 100644 --- a/include/Module.xs +++ b/include/Module.xs @@ -25,4 +25,9 @@ function modBuild() var testFiles = libUtility.listAllFiles (".h", "include", true); for (var k = 0 ; k < testFiles.length; k++) Pkg.otherFiles[Pkg.otherFiles.length++] = testFiles[k]; + + /* Add all the .mk files to the release package. */ + var mkFiles = libUtility.listAllFiles (".mk", "include", true); + for (var k = 0 ; k < mkFiles.length; k++) + Pkg.otherFiles[Pkg.otherFiles.length++] = mkFiles[k]; } diff --git a/src/Module.xs b/src/Module.xs index 96debe7..a91726d 100644 --- a/src/Module.xs +++ b/src/Module.xs @@ -28,43 +28,45 @@ var mcbsplldFile = [ function modBuild() { - /* Build the device independent libraries for all the targets specified. */ - for (var targets=0; targets < socs["all"].targets.length; targets++) + if (socs.length != 0) { - var targetFiles = mcbsplldFile.slice(); /* make copy */ - var libOptions = { - copts: socs["all"].copts, - incs: mcbsplldIncPath, - }; - libUtility.buildLibrary ("", "false", libOptions, Pkg.name, socs["all"].targets[targets], targetFiles); - } - - - /* Build library targets for device dependent SoCs */ - for (var soc=0; soc < soc_names.length; soc++) - { - var dev = socs[soc_names[soc]]; + /* Build the device independent libraries for all the targets specified. */ + for (var targets=0; targets < socs["all"].targets.length; targets++) + { + if(socs["all"].build == "false") + continue; + var targetFiles = mcasplldFiles.slice(); /* make copy */ + var libOptions = { + copts: socs["all"].copts, + incs: lldIncludePath, + }; + libUtility.buildLibrary ("", "false", "false", libOptions, Pkg.name, socs["all"].targets[targets], targetFiles); + } - /* do not proceed if this SoC is not configured to be built */ - if (dev.build == "false") - continue; + /* Build library targets for device dependent SoCs */ + for (var soc=0; soc < soc_names.length; soc++) + { + var dev = socs[soc_names[soc]]; + + /* do not proceed if this SoC is not configured to be built */ + if (dev.build == "false") + continue; - if (dev.socDevLib == "true") - { - var targetFiles_soc = mcbsplldFile.slice(); /* make copy */ - targetFiles_soc.push (deviceConstruct[0]+soc_names[soc]+deviceConstruct[1]); - /* Build the libraries for all the targets specified. */ - for (var targets=0; targets < dev.targets.length; targets++) - { - var libOptions = { - copts: dev.copts, - incs: mcbsplldIncPath, - }; - libUtility.buildLibrary (soc_names[soc], "true", libOptions, Pkg.name, dev.targets[targets], targetFiles_soc); + if (dev.socDevLib == "true") + { + var targetFiles_soc = mcasplldFiles.slice(); /* make copy */ + targetFiles_soc.push (deviceConstruct[0]+soc_names[soc]+deviceConstruct[1]); + /* Build the libraries for all the targets specified. */ + for (var targets=0; targets < dev.targets.length; targets++) + { + var libOptions = { + copts: dev.copts, + incs: lldIncludePath, + }; + libUtility.buildLibrary (soc_names[soc], "false", "true", libOptions, Pkg.name, dev.targets[targets], targetFiles_soc); + } } - } - - + } } /* Add all the .c files to the release package. */ @@ -76,5 +78,10 @@ function modBuild() var testFiles = libUtility.listAllFiles (".h", "src", true); for (var k = 0 ; k < testFiles.length; k++) Pkg.otherFiles[Pkg.otherFiles.length++] = testFiles[k]; + + /* Add all the .mk files to the release package. */ + var mkFiles = libUtility.listAllFiles (".mk", "src", true); + for (var k = 0 ; k < mkFiles.length; k++) + Pkg.otherFiles[Pkg.otherFiles.length++] = mkFiles[k]; }