build.ck 998 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /*++
  2. Copyright (c) 2014 Minoca Corp. All Rights Reserved
  3. Module Name:
  4. ElfConv
  5. Abstract:
  6. This module builds the ElfConv utility, which converts an ELF image
  7. into a PE image. UEFI exclusively loads PE images, which is why the
  8. conversion is necessary. With certain restrictions (such as the lack
  9. of dynamic libraries) conversion is doable, though not a lot of fun.
  10. Author:
  11. Evan Green 10-Mar-2014
  12. Environment:
  13. Build
  14. --*/
  15. function build() {
  16. sources = [
  17. "elfc32.c",
  18. "elfconv.c",
  19. ];
  20. includes = [
  21. "$//uefi/include"
  22. ];
  23. app = {
  24. "label": "elfconv",
  25. "inputs": sources,
  26. "includes": includes,
  27. "build": TRUE
  28. };
  29. entries = application(app);
  30. tool = {
  31. "type": "tool",
  32. "name": "elfconv",
  33. "command": "$^//uefi/tools/elfconv/elfconv $ELFCONV_FLAGS -o $OUT $IN",
  34. "description": "Converting to PE - $IN"
  35. };
  36. return entries + [tool];
  37. }
  38. return build();