]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - keystone-rtos/rm-lld.git/blob - package.xs
Allow access to single netcp-tx channel for SA
[keystone-rtos/rm-lld.git] / package.xs
1 /*\r
2  *  ======== package.xs ========\r
3  *\r
4  */\r
5 \r
6 \r
7 /*\r
8  *  ======== Package.getLibs ========\r
9  *  This function is called when a program's configuration files are\r
10  *  being generated and it returns the name of a library appropriate\r
11  *  for the program's configuration.\r
12  */\r
13 \r
14 function getLibs(prog)\r
15 {\r
16     var suffix = prog.build.target.suffix;\r
17 \r
18     var name = this.$name + ".a" + suffix;\r
19 \r
20     /* Read LIBDIR variable */\r
21     var lib = java.lang.System.getenv("LIBDIR");\r
22 \r
23     /* If NULL, default to "lib" folder */\r
24     if (lib == null)\r
25     {\r
26         lib = "./lib";\r
27     } else {\r
28         print ("\tSystem environment LIBDIR variable defined : " + lib);\r
29     }\r
30 \r
31     /* Get target folder, if applicable */\r
32     if ( java.lang.String(suffix).contains('66') )\r
33         lib = lib + "/c66";\r
34 \r
35     /* Get library name with path */\r
36     lib = lib + "/" + name;\r
37     if (java.io.File(this.packageBase + lib).exists()) {\r
38        return lib;\r
39     }\r
40 \r
41     /* Could not find any library, throw exception */\r
42     throw new Error("\tLibrary not found: " + this.packageBase + lib);\r
43 }\r
44 \r
45 /*\r
46  *  ======== package.close ========\r
47  */\r
48 function close()\r
49 {    \r
50     if (xdc.om.$name != 'cfg') {\r
51         return;\r
52     }\r
53 }\r