/* * package.bld * * xdc build specification file for the RM package. * * Copyright (C) 2009 Texas Instruments Incorporated - http://www.ti.com/ * * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the * distribution. * * Neither the name of Texas Instruments Incorporated nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ var Build = xdc.useModule('xdc.bld.BuildEnvironment'); var Pkg = xdc.useModule('xdc.bld.PackageContents'); var objListDA830 = [ /* The configuration file. */ "src/configs/edma3_da830_cfg.c", /* Common file. */ "src/edma3resmgr.c", /* File defining internal data structures. */ "src/edma3_rm_gbl_data.c", ]; var objListC6748 = [ /* The configuration file. */ "src/configs/edma3_c6748_cfg.c", /* Common file. */ "src/edma3resmgr.c", /* File defining internal data structures. */ "src/edma3_rm_gbl_data.c", ]; var objListOMAPL138 = [ /* The configuration file. */ "src/configs/edma3_omapl138_cfg.c", /* Common file. */ "src/edma3resmgr.c", /* File defining internal data structures. */ "src/edma3_rm_gbl_data.c", ]; var objListSimTCI6498 = [ /* The configuration file. */ "src/configs/edma3_tci6498_cfg.c", /* Common file. */ "src/edma3resmgr.c", /* File defining internal data structures. */ "src/edma3_rm_gbl_data.c", ]; var objListSimTI816X = [ /* The configuration file. */ "src/configs/edma3_ti816x_cfg.c", /* Common file. */ "src/edma3resmgr.c", /* File defining internal data structures. */ "src/edma3_rm_gbl_data.c", ]; var objListEVMTI816X = [ /* The configuration file. */ "src/configs/edma3_ti816x_cfg.c", /* Common file. */ "src/edma3resmgr.c", /* File defining internal data structures. */ "src/edma3_rm_gbl_data.c", ]; var objListEVM6472 = [ /* The configuration file. */ "src/configs/edma3_c6472_cfg.c", /* Common file. */ "src/edma3resmgr.c", /* File defining internal data structures. */ "src/edma3_rm_gbl_data.c", ]; var objListEVMTCI6486 = [ /* The configuration file. */ "src/configs/edma3_tci6486_cfg.c", /* Common file. */ "src/edma3resmgr.c", /* File defining internal data structures. */ "src/edma3_rm_gbl_data.c", ]; var objListGeneric = [ /* Common file. */ "src/edma3resmgr.c", /* File defining internal data structures. */ "src/edma3_rm_gbl_data.c", ]; var objList = [ objListDA830, objListSimTCI6498, objListC6748, objListOMAPL138, objListSimTI816X, objListEVMTI816X, objListEVM6472, objListEVMTCI6486, ]; /* Platforms supported */ var plat_supported = [ 'ti.platforms.evmDA830', 'ti.platforms.simTCI6498', 'ti.platforms.evm6748', 'ti.platforms.evmOMAPL138', 'ti.platforms.simDM8168', 'ti.platforms.evmDM8168', 'ti.platforms.evm6472', 'ti.platforms.evmTCI6486', ]; /* Directories for each platform */ var dir = [ 'da830/', 'tci6498/', 'c6748/', 'omapl138/', 'simti816x/', 'evmti816x/', 'c6472/', 'tci6486/', 'generic/', ]; for each (var targ in Build.targets) { for each (var plat in targ.platforms) { var lib = "lib/"; var bool = 0; for (var i = 0; i < plat_supported.length; i++) { if (java.lang.String(plat).equals(plat_supported[i])) { /* Choose the selected platform */ lib = lib + dir[i]; bool = 1; break; } } if (bool == 0) { //throw new Error('Unexpected value in "platform" parameter') } if (java.lang.String(targ.model.endian).equals("big")) { Pkg.addLibrary(lib + "Debug/" + Pkg.name, targ, { defs:"-DBIG_ENDIAN_MODE", profile: "debug"} ).addObjects(objList[i]); Pkg.addLibrary(lib + "Release/" + Pkg.name, targ, { defs:"-DBIG_ENDIAN_MODE", profile: "release"} ).addObjects(objList[i]); } else { Pkg.addLibrary(lib + "Debug/" + Pkg.name, targ, { defs:"", profile: "debug"} ).addObjects(objList[i]); Pkg.addLibrary(lib + "Release/" + Pkg.name, targ, { defs:"", profile: "release"} ).addObjects(objList[i]); } } var lib = "lib/generic/"; /* Also build a generic library */ if (java.lang.String(targ.model.endian).equals("big")) { Pkg.addLibrary(lib + "Debug/" + Pkg.name, targ, { defs:"-DBIG_ENDIAN_MODE -DGENERIC ", profile: "debug"} ).addObjects(objListGeneric); Pkg.addLibrary(lib + "Release/" + Pkg.name, targ, { defs:"-DBIG_ENDIAN_MODE -DGENERIC ", profile: "release"} ).addObjects(objListGeneric); } else { Pkg.addLibrary(lib + "Debug/" + Pkg.name, targ, { defs:" -DGENERIC ", profile: "debug"} ).addObjects(objListGeneric); Pkg.addLibrary(lib + "Release/" + Pkg.name, targ, { defs:" -DGENERIC ", profile: "release"} ).addObjects(objListGeneric); } } Pkg.otherFiles=[ '.settings/org.eclipse.cdt.core.prefs', 'docs', 'lib/da830/Debug/ti.sdo.edma3.rm.a674', 'lib/da830/Release/ti.sdo.edma3.rm.a674', 'lib/c6748/Debug/ti.sdo.edma3.rm.a674', 'lib/c6748/Release/ti.sdo.edma3.rm.a674', 'lib/omapl138/Debug/ti.sdo.edma3.rm.a674', 'lib/omapl138/Release/ti.sdo.edma3.rm.a674', 'lib/tci6498/Debug/ti.sdo.edma3.rm.a64P', 'lib/tci6498/Debug/ti.sdo.edma3.rm.a64Pe', 'lib/tci6498/Release/ti.sdo.edma3.rm.a64P', 'lib/tci6498/Release/ti.sdo.edma3.rm.a64Pe', 'lib/simti816x/Debug/ti.sdo.edma3.rm.a674', 'lib/simti816x/Release/ti.sdo.edma3.rm.a674', 'lib/evmti816x/Debug/ti.sdo.edma3.rm.a674', 'lib/evmti816x/Release/ti.sdo.edma3.rm.a674', 'lib/c6472/Debug/ti.sdo.edma3.rm.a64P', 'lib/c6472/Debug/ti.sdo.edma3.rm.a64P', 'lib/c6472/Debug/ti.sdo.edma3.rm.a64Pe', 'lib/c6472/Release/ti.sdo.edma3.rm.a64P', 'lib/c6472/Release/ti.sdo.edma3.rm.a64Pe', 'lib/tci6486/Debug/ti.sdo.edma3.rm.a64P', 'lib/tci6486/Debug/ti.sdo.edma3.rm.a64Pe', 'lib/tci6486/Release/ti.sdo.edma3.rm.a64P', 'lib/tci6486/Release/ti.sdo.edma3.rm.a64Pe', 'lib/Debug/ti.sdo.edma3.rm.a674', 'lib/Release/ti.sdo.edma3.rm.a674', 'lib/Debug/ti.sdo.edma3.rm.a64P', 'lib/Debug/ti.sdo.edma3.rm.a64Pe', 'lib/Release/ti.sdo.edma3.rm.a64P', 'lib/Release/ti.sdo.edma3.rm.a64Pe', 'src', '.cdtproject', '.project', 'edma3_common.h', 'edma3_rm.h', 'package.bld', 'package.xs', 'RM.xdc', 'RM.xdt', ];