build.ck 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. /*++
  2. Copyright (c) 2013 Minoca Corp.
  3. This file is licensed under the terms of the GNU General Public License
  4. version 3. Alternative licensing terms are available. Contact
  5. info@minocacorp.com for details. See the LICENSE file at the root of this
  6. project for complete licensing information.
  7. Module Name:
  8. System Profiler
  9. Abstract:
  10. This library contains the System Profiler, which lends insight into the
  11. real-time resource usage of the system.
  12. Author:
  13. Chris Stevens 1-Jul-2013
  14. Environment:
  15. Kernel
  16. --*/
  17. from menv import kernelLibrary, mconfig;
  18. function build() {
  19. var arch = mconfig.arch;
  20. var archSources;
  21. var baseSources;
  22. var entries;
  23. var lib;
  24. baseSources = [
  25. "info.c",
  26. "profiler.c"
  27. ];
  28. if ((arch == "armv7") || (arch == "armv6")) {
  29. archSources = [
  30. "armv7/archprof.c"
  31. ];
  32. } else if (arch == "x86") {
  33. archSources = [
  34. "x86/archprof.c"
  35. ];
  36. } else if (arch == "x64") {
  37. archSources = [
  38. "x64/archprof.c"
  39. ];
  40. }
  41. lib = {
  42. "label": "sp",
  43. "inputs": baseSources + archSources,
  44. };
  45. entries = kernelLibrary(lib);
  46. return entries;
  47. }