build.ck 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. /*++
  2. Copyright (c) 2014 Minoca Corp. All Rights Reserved
  3. Module Name:
  4. Architecture Support
  5. Abstract:
  6. This module contains architecure-specific UEFI core support functions.
  7. Author:
  8. Evan Green 27-Mar-2014
  9. Environment:
  10. Firmware
  11. --*/
  12. function build() {
  13. x86_sources = [
  14. "x86/archlib.c",
  15. "x86/archsup.S",
  16. "x86/ioport.S",
  17. "x86/regacces.c"
  18. ];
  19. arm_sources = [
  20. "armv7/archlib.c",
  21. "armv7/regacces.c"
  22. ];
  23. armv7_sources = arm_sources + [
  24. "armv7/archsup.S"
  25. ];
  26. armv6_sources = arm_sources + [
  27. "armv6/archsup.S"
  28. ];
  29. if (arch == "armv7") {
  30. sources = armv7_sources;
  31. } else if (arch == "armv6") {
  32. sources = armv6_sources;
  33. } else if (arch == "x86") {
  34. sources = x86_sources;
  35. } else {
  36. assert(0, "Unknown architecture");
  37. }
  38. includes = [
  39. "$//uefi/include",
  40. "$//uefi/core"
  41. ];
  42. sources_config = {
  43. "CFLAGS": ["-fshort-wchar"],
  44. };
  45. lib = {
  46. "label": "uefiarch",
  47. "inputs": sources,
  48. "sources_config": sources_config,
  49. "includes": includes
  50. };
  51. entries = static_library(lib);
  52. return entries;
  53. }
  54. return build();