93062da8f58a74c6bd5e8b74ba73c8bf2648ec87
[keystone-rtos/edma3_lld.git] / packages / ti / sdo / edma3 / rm / sample / package.bld
1 /*
2 *  Copyright 2006 by Texas Instruments Incorporated.
3 *
4 *  All rights reserved. Property of Texas Instruments Incorporated.
5 *  Restricted rights to use, duplicate or disclose this code are
6 *  granted through contract.
7 *
8 */
10 var Build = xdc.useModule('xdc.bld.BuildEnvironment');
11 var Pkg = xdc.useModule('xdc.bld.PackageContents');
13 var objListDA830 = [
14     "src/bios6_edma3_rm_sample_da830_cfg.c",
15     "src/bios6_edma3_rm_sample_cs.c",
16     "src/bios6_edma3_rm_sample_init.c",
17 ];
19 var objList = [
20         objListDA830,
21 ];
23 /* Platforms supported */
24 var plat_supported = [
25                     'ti.platforms.evmDA830',
26                                         ];
28 /* Directories for each platform */
29 var dir = [
30             'da830/',
31           ];
33 for each (var targ in Build.targets)
34 {
35         for each (var plat in targ.platforms)
36         {
37                 var lib = "lib/";
38                 var bool = 0;
40             for (var i = 0; i < plat_supported.length; i++)
41                 {
42                 if (java.lang.String(plat).equals(plat_supported[i]))
43                     {
44                         /* Choose the selected platform */
45                         lib = lib + dir[i];
46                         bool = 1;
47                         break;
48                     }
49                 }
51             if (bool == 0)
52                 throw new Error('Unexpected value in "platform" parameter')
54                 Pkg.addLibrary(lib + "Debug/" + Pkg.name, targ, { profile: "debug"}).addObjects(objList[i]);
55                 Pkg.addLibrary(lib + "Release/" + Pkg.name, targ, { profile: "release"}).addObjects(objList[i]);
56         }
57 }
60 Pkg.otherFiles=[
61         'lib/da830/Debug/ti.sdo.edma3.rm.sample.a674',
62         'lib/da830/Release/ti.sdo.edma3.rm.sample.a674',
63         'src',
64         'bios6_edma3_rm_sample.h',
65         'package.bld',
66         'package.xs',
67 ];