build.ck 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. /*++
  2. Copyright (c) 2012 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. Process/Thread Library
  9. Abstract:
  10. This library contains the process and thread library. It maintains the
  11. lifecycle of threads (units of execution) and processes (collections of
  12. threads in a shared address space).
  13. Author:
  14. Evan Green 6-Aug-2012
  15. Environment:
  16. Kernel
  17. --*/
  18. from menv import kernelLibrary, mconfig;
  19. function build() {
  20. var arch = mconfig.arch;
  21. var archSources;
  22. var baseSources;
  23. var entries;
  24. var lib;
  25. baseSources = [
  26. "env.c",
  27. "info.c",
  28. "init.c",
  29. "perm.c",
  30. "pgroups.c",
  31. "process.c",
  32. "psimag.c",
  33. "signals.c",
  34. "thread.c",
  35. "usrlock.c",
  36. "utimer.c",
  37. "uts.c"
  38. ];
  39. if ((arch == "armv7") || (arch == "armv6")) {
  40. archSources = [
  41. "armv7/psarch.c"
  42. ];
  43. } else if (arch == "x86") {
  44. archSources = [
  45. "x86/psarch.c"
  46. ];
  47. } else if (arch == "x64") {
  48. archSources = [
  49. "x64/psarch.c"
  50. ];
  51. }
  52. lib = {
  53. "label": "ps",
  54. "inputs": baseSources + archSources,
  55. };
  56. entries = kernelLibrary(lib);
  57. return entries;
  58. }