1 /******************************************************************************
2 * FILE PURPOSE: RM Source module specification file.
3 ******************************************************************************
4 * FILE NAME: module.xs
5 *
6 * DESCRIPTION:
7 * This file contains the module specification for the RM source directory.
8 *
9 * Copyright (C) 2012, Texas Instruments, Inc.
10 *****************************************************************************/
12 /* Load the library utility. */
13 var libUtility = xdc.loadCapsule ("../build/buildlib.xs");
15 var rmFile = [
16 "src/rm.c",
17 "src/rm_nameserver.c",
18 "src/rm_policy.c",
19 "src/rm_services.c",
20 "src/rm_transport.c",
21 "src/libfdt/fdt.c",
22 "src/libfdt/fdt_ro.c",
23 "src/libfdt/fdt_rw.c",
24 "src/libfdt/fdt_strerror.c",
25 "src/libfdt/fdt_sw.c",
26 "src/libfdt/fdt_wip.c",
27 ];
29 /**************************************************************************
30 * FUNCTION NAME : modBuild
31 **************************************************************************
32 * DESCRIPTION :
33 * The function is used to build all the components of the RM library
34 **************************************************************************/
35 function modBuild()
36 {
37 /* Build the libraries for all the targets specified. */
38 for (var targets=0; targets < Build.targets.length; targets++)
39 {
40 var libOptions = {
41 incs: lldIncludePath,
42 };
44 libUtility.buildLibrary (libOptions, "ti.drv.rm", Build.targets[targets], rmFile);
45 }
47 /* Add all the .c files to the release package. */
48 var testFiles = libUtility.listAllFiles (".c", "src", true);
49 for (var k = 0 ; k < testFiles.length; k++)
50 Pkg.otherFiles[Pkg.otherFiles.length++] = testFiles[k];
52 /* Add all the .h files to the release package. */
53 var testFiles = libUtility.listAllFiles (".h", "src", true);
54 for (var k = 0 ; k < testFiles.length; k++)
55 Pkg.otherFiles[Pkg.otherFiles.length++] = testFiles[k];
57 /* Add all the .c files to the release package. */
58 var testFiles = libUtility.listAllFiles (".c", "src/libfdt", true);
59 for (var k = 0 ; k < testFiles.length; k++)
60 Pkg.otherFiles[Pkg.otherFiles.length++] = testFiles[k];
62 /* Add all the .h files to the release package. */
63 var testFiles = libUtility.listAllFiles (".h", "src/libfdt", true);
64 for (var k = 0 ; k < testFiles.length; k++)
65 Pkg.otherFiles[Pkg.otherFiles.length++] = testFiles[k];
66 }