Adding TCI6498 support in RM sample init lib
[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/platforms/sample_da830_cfg.c",
15     "src/platforms/sample_da830_int_reg.c",
16     "src/sample_cs.c",
17     "src/sample_init.c",
18 ];
20 var objListSimTCI6498 = [
21     "src/platforms/sample_tci6498_cfg.c",
22     "src/platforms/sample_tci6498_int_reg.c",
23     "src/sample_cs.c",
24     "src/sample_init.c",
25 ];
27 var objList = [
28         objListDA830,
29         objListSimTCI6498,
30 ];
32 /* Platforms supported */
33 var plat_supported = [
34                     'ti.platforms.evmDA830',
35                     'ti.platforms.simTCI6498',
36                ];
38 /* Directories for each platform */
39 var dir = [
40             'da830/',
41             'tci6498/',
42           ];
44 for each (var targ in Build.targets)
45 {
46         for each (var plat in targ.platforms)
47         {
48                 var lib = "lib/";
49                 var bool = 0;
51             for (var i = 0; i < plat_supported.length; i++)
52                 {
53                 if (java.lang.String(plat).equals(plat_supported[i]))
54                     {
55                         /* Choose the selected platform */
56                         lib = lib + dir[i];
57                         bool = 1;
58                         break;
59                     }
60                 }
62             if (bool == 0)
63                 throw new Error('Unexpected value in "platform" parameter')
65                 if (java.lang.String(targ.model.endian).equals("big"))  {
66                         Pkg.addLibrary(lib + "Debug/" + Pkg.name, targ,
67                                 { defs:"-DBIG_ENDIAN_MODE", profile: "debug"}
68                                 ).addObjects(objList[i]);
69                         Pkg.addLibrary(lib + "Release/" + Pkg.name, targ,
70                                 { defs:"-DBIG_ENDIAN_MODE", profile: "release"}
71                                 ).addObjects(objList[i]);
72                 } else {
73                         Pkg.addLibrary(lib + "Debug/" + Pkg.name, targ,
74                                 { defs:"", profile: "debug"}
75                                 ).addObjects(objList[i]);
76                         Pkg.addLibrary(lib + "Release/" + Pkg.name, targ,
77                                 { defs:"", profile: "release"}
78                                 ).addObjects(objList[i]);
79                 }
80         }
81 }
84 Pkg.otherFiles=[
85                 '.settings/org.eclipse.cdt.core.prefs',
86         'lib/da830/Debug/ti.sdo.edma3.rm.sample.a674',
87         'lib/da830/Release/ti.sdo.edma3.rm.sample.a674',
88         'lib/tci6498/Debug/ti.sdo.edma3.rm.sample.a64P',
89         'lib/tci6498/Debug/ti.sdo.edma3.rm.sample.a64Pe',
90         'lib/tci6498/Release/ti.sdo.edma3.rm.sample.a64P',
91         'lib/tci6498/Release/ti.sdo.edma3.rm.sample.a64Pe',
92         'src/sample_cs.c',
93         'src/sample_init.c',
94                 'src/platforms/sample_da830_cfg.c',
95                 'src/platforms/sample_da830_int_reg.c',
96                 'src/platforms/sample_tci6498_cfg.c',
97                 'src/platforms/sample_tci6498_int_reg.c',
98         '.cdtproject',
99         '.project',
100         'bios6_edma3_rm_sample.h',
101         'package.bld',
102         'package.xs',
103 ];