wolfssl/tirtos/cyassl.bld

87 lines
2.7 KiB
Plaintext
Raw Normal View History

/*
* Generally there is no need to edit this file!
*
* This file controls which libraries are built, as well as compiler options
* to use.
*
* The contents of this file usually don't change, but having it in your
* ownership allows you to tweak your compiler options. If you do change
* this file, however, on the next upgrade of the product we recommend
* that you take "cyassl.bld" file as supplied by the upgrade and then merge
* your changes with it.
*/
/*
* ======== cyassl.bld ========
* This script is run prior to all build scripts. It sets host-system-
* independent values for targets and platforms, then it attempts to
* find the host-system-specific user.bld script that sets rootDirs.
*
* These settings may be a function of the following global variables:
*
* environment a hash table of environment strings
*
* arguments an array of string arguments to the _config.bld script
* initialized as follows:
* arguments[0] - the file name of the _config.bld script
* arguments[1] - the first argument specified in XDCARGS
* :
* arguments[n] - the n'th argument in XDCARGS
*
* Build an alias for xdc.om.xdc.bld.BuildEnvironment
*/
var armOpts = " -ms ";
var gnuOpts = "";
var iarOpts = "";
/* Uncomment the following lines to build libraries for debug mode: */
// Pkg.attrs.profile = "debug";
// armOpts += " -g -o0 ";
// gnuOpts += " -g ";
// iarOpts += " --debug ";
var ccOpts = {
"ti.targets.arm.elf.M4F" : armOpts,
"gnu.targets.arm.M4F" : gnuOpts,
"iar.targets.arm.M4F" : iarOpts,
};
/* initialize local vars with those set in xdcpaths.mak (via XDCARGS) */
for (arg = 0; arg < arguments.length; arg++) {
/*
* Get the compiler's installation directory.
* For "ti.targets.arm.elf.M4F=/vendors/arm/6.1.0",
* we get "/vendors/arm/6.1.0"
*/
var targetName = arguments[arg].split("=")[0];
var rootDir = arguments[arg].split("=")[1];
/* only build for the specified compilers */
if (rootDir == "" || rootDir == undefined) {
continue;
}
if (targetName.match(/^TivaWareDir/) ) {
TivaWareDir = rootDir;
continue;
}
var target = xdc.useModule(targetName);
target.rootDir = rootDir;
target.ccOpts.suffix += ccOpts[targetName];
Build.targets.$add(target);
}
/* Include Path (needed to find NDK headers) */
var ndkPath = "$(NDK_INSTALL_DIR)/packages/ti/ndk/";
var cyasslPathInclude = " -I" + ndkPath + "/inc" + " -I" + ndkPath
+ "/inc/bsd -DTIRTOS ";
/* lib/ is a generated directory that 'xdc clean' should remove */
var Pkg = xdc.useModule('xdc.bld.PackageContents');
Pkg.generatedFiles.$add("lib/");