1 /******************************************************************************
2 * FILE PURPOSE: LIBFDT specification file.
3 ******************************************************************************
4 * FILE NAME: module.xs
5 *
6 * DESCRIPTION:
7 * This file contains the module specification for the LIBFDT 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 libfdtFile = [
16 "libfdt/fdt.c",
17 "libfdt/fdt_ro.c",
18 "libfdt/fdt_rw.c",
19 "libfdt/fdt_strerror.c",
20 "libfdt/fdt_sw.c",
21 "libfdt/fdt_wip.c",
22 ];
24 /**************************************************************************
25 * FUNCTION NAME : modBuild
26 **************************************************************************
27 * DESCRIPTION :
28 * The function is used to build all the components of the RM library
29 **************************************************************************/
30 function modBuild()
31 {
32 /* Build the libraries for all the targets specified. */
33 for (var targets=0; targets < Build.targets.length; targets++)
34 {
35 var libOptions = {
36 incs: lldIncludePath,
37 };
39 libUtility.buildLibrary (libOptions, "ti.drv.rm.libfdt", Build.targets[targets], libfdtFile);
40 }
42 /* Add all the .c files to the release package. */
43 var testFiles = libUtility.listAllFiles (".c", "libfdt", true);
44 for (var k = 0 ; k < testFiles.length; k++)
45 Pkg.otherFiles[Pkg.otherFiles.length++] = testFiles[k];
47 /* Add all the .h files to the release package. */
48 var testFiles = libUtility.listAllFiles (".h", "libfdt", true);
49 for (var k = 0 ; k < testFiles.length; k++)
50 Pkg.otherFiles[Pkg.otherFiles.length++] = testFiles[k];
51 }