/* * package.bld * * xdc build specification file for the EDMA DRV module. * * 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 objList = [ "src/edma3_drv_init.c", "src/edma3_drv_basic.c", "src/edma3_drv_adv.c", ]; /* Targets supported */ var targ_supported = [ 'C64P', 'C64P_big_endian', 'C674', 'Arm9', 'A8F', ]; /* Directories for each target */ var dir = [ '64p/', '64p/', '674/', 'arm9/', 'a8/', ]; for each (var targ in Build.targets) { /* compile the library only for the default platform otherwise error will * will be thrown by xdc that library already exists */ var plat = targ.platform; var lib = "lib/"; var bool = 0; if (targ.platforms.length == 0) continue; for (var i = 0; i < targ_supported.length; i++) { if (java.lang.String(targ.name).equals(targ_supported[i])) { /* Choose the selected target */ lib = lib + dir[i]; bool = 1; break; } } if (bool == 0) throw new Error('Unexpected value in "target" 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); Pkg.addLibrary(lib + "release/" + Pkg.name, targ, { defs:"-DBIG_ENDIAN_MODE", profile: "release"} ).addObjects(objList); } else { Pkg.addLibrary(lib + "debug/" + Pkg.name, targ, { defs:"", profile: "debug"} ).addObjects(objList); Pkg.addLibrary(lib + "release/" + Pkg.name, targ, { defs:"", profile: "release"} ).addObjects(objList); } } Pkg.otherFiles=[ '.settings/org.eclipse.cdt.core.prefs', 'docs', 'lib/debug/ti.sdo.edma3.drv.a64P', 'lib/debug/ti.sdo.edma3.drv.a64Pe', 'lib/debug/ti.sdo.edma3.drv.a674', 'lib/release/ti.sdo.edma3.drv.a64P', 'lib/release/ti.sdo.edma3.drv.a64Pe', 'lib/release/ti.sdo.edma3.drv.a674', 'lib/debug/ti.sdo.edma3.drv.ae64P', 'lib/debug/ti.sdo.edma3.drv.ae64Pe', 'lib/debug/ti.sdo.edma3.drv.ae674', 'lib/release/ti.sdo.edma3.drv.ae64P', 'lib/release/ti.sdo.edma3.drv.ae64Pe', 'lib/release/ti.sdo.edma3.drv.ae674', 'src', '.cdtproject', '.project', 'DRV.xdc', 'edma3_drv.h', 'package.bld', 'package.xs', ];