package.bld

来自「for the TI dm6446 platformBackground sub」· BLD 代码 · 共 43 行

BLD
43
字号
//  Define the list of targets to build for in the targs arrayvar targs = [MVArm9, C64P];//  Define the build profiles to build across the targetsvar profiles = ["debug", "release"];//  Define the base name for the executable(s) builtvar basename = "abs";//  The following code uses the java.io.File.list() method to generate an array//      of all files in the current directory ('.') and then sorts out .c filesvar sources = java.io.File('.').list();var csources = [];for (var i = 0; i < sources.length; i++){	if(String(sources[i]).match(/.*\.c$/))		csources.push(sources[i]);}		//  The build phase cycles through the arrays of build targets and profiles//       and adds an executable for each combinationfor (var i = 0; i < targs.length; i++) {     for(var j = 0; j < profiles.length; j++){     	Pkg.addLibrary( basename + "_" + profiles[j], targs[i], {		     profile: profiles[j],		} 		).addObjects( csources );     }}//  This Epilogue is appended to the RTSC-generated makefile, package.mak//       It begins by including ../../custom.mak, which contains code to force//       a rebuild if new source files are added into the directoryPkg.makeEpilogue =  "include ../../custom.mak\n\n";//       and add a dummy rule for installPkg.makeEpilogue += "install: ";for (var i=0; i<targs.length; i++)     for(var j = 0; j < profiles.length; j++)	Pkg.makeEpilogue += basename + "_" + profiles[j] + ".a" + 						targs[i].suffix + " ";Pkg.makeEpilogue += "\n\n";

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?