build.ck 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. /*++
  2. Copyright (c) 2012 Minoca Corp. All Rights Reserved
  3. Module Name:
  4. Kernel Debugger
  5. Abstract:
  6. This library contains the support code necessary to enable debugging
  7. of a running kernel. This library is included in all versions of the
  8. operating system.
  9. Author:
  10. Evan Green 10-Aug-2012
  11. Environment:
  12. Kernel
  13. --*/
  14. function build() {
  15. base_sources = [
  16. "kdebug.c"
  17. ];
  18. boot_sources = [
  19. ":kdebug.o",
  20. ];
  21. if ((arch == "armv7") || (arch == "armv6")) {
  22. arch_sources = [
  23. "armv7/kdarch.c",
  24. "armv7/kdatomic.S",
  25. "armv7/kdsup.S",
  26. "armv7/kdsupc.c"
  27. ];
  28. boot_arch_sources = [
  29. ":armv7/kdarch.o",
  30. "boot/armv7/kdatomic.S",
  31. ":armv7/kdsup.o",
  32. ":armv7/kdsupc.o"
  33. ];
  34. } else if ((arch == "x86") || (arch == "x64")) {
  35. arch_sources = [
  36. "x86/kdarch.c",
  37. "x86/kdsup.S"
  38. ];
  39. boot_arch_sources = [
  40. ":x86/kdarch.o",
  41. ":x86/kdsup.o"
  42. ];
  43. }
  44. lib = {
  45. "label": "kd",
  46. "inputs": base_sources + arch_sources,
  47. };
  48. boot_lib = {
  49. "label": "kdboot",
  50. "inputs": boot_sources + boot_arch_sources,
  51. };
  52. entries = static_library(lib);
  53. entries += static_library(boot_lib);
  54. return entries;
  55. }
  56. return build();