You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Makefile 3.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. ###############################################################################
  2. #
  3. # Initialise various variables
  4. #
  5. CLEANUP :=
  6. CFLAGS :=
  7. ASFLAGS :=
  8. LDFLAGS :=
  9. MAKEDEPS := Makefile
  10. ###############################################################################
  11. #
  12. # Locations of tools
  13. #
  14. HOST_CC := gcc
  15. RM := rm -f
  16. TOUCH := touch
  17. MKDIR := mkdir
  18. CP := cp
  19. ECHO := echo
  20. PRINTF := printf
  21. PERL := /usr/bin/perl
  22. CC := $(CROSS_COMPILE)gcc
  23. CPP := $(CC) -E
  24. AS := $(CROSS_COMPILE)as
  25. LD := $(CROSS_COMPILE)ld
  26. SIZE := $(CROSS_COMPILE)size
  27. AR := $(CROSS_COMPILE)ar
  28. RANLIB := $(CROSS_COMPILE)ranlib
  29. OBJCOPY := $(CROSS_COMPILE)objcopy
  30. NM := $(CROSS_COMPILE)nm
  31. OBJDUMP := $(CROSS_COMPILE)objdump
  32. PARSEROM := $(PERL) ./util/parserom.pl
  33. MAKEROM := $(PERL) ./util/makerom.pl
  34. SYMCHECK := $(PERL) ./util/symcheck.pl
  35. SORTOBJDUMP := $(PERL) ./util/sortobjdump.pl
  36. NRV2B := ./util/nrv2b
  37. ZBIN := ./util/zbin
  38. ELF2EFI32 := ./util/elf2efi32
  39. ELF2EFI64 := ./util/elf2efi64
  40. EFIROM := ./util/efirom
  41. ICCFIX := ./util/iccfix
  42. DOXYGEN := doxygen
  43. ###############################################################################
  44. #
  45. # SRCDIRS lists all directories containing source files.
  46. #
  47. SRCDIRS :=
  48. SRCDIRS += libgcc
  49. SRCDIRS += core
  50. SRCDIRS += proto
  51. SRCDIRS += net net/tcp net/udp
  52. SRCDIRS += image
  53. SRCDIRS += drivers/bus
  54. SRCDIRS += drivers/net
  55. SRCDIRS += drivers/net/e1000
  56. SRCDIRS += drivers/net/phantom
  57. SRCDIRS += drivers/block
  58. SRCDIRS += drivers/nvs
  59. SRCDIRS += drivers/bitbash
  60. SRCDIRS += drivers/infiniband
  61. SRCDIRS += interface/pxe interface/efi interface/smbios
  62. SRCDIRS += tests
  63. SRCDIRS += crypto crypto/axtls crypto/matrixssl
  64. SRCDIRS += hci hci/commands hci/tui
  65. SRCDIRS += hci/mucurses hci/mucurses/widgets
  66. SRCDIRS += usr
  67. # NON_AUTO_SRCS lists files that are excluded from the normal
  68. # automatic build system.
  69. #
  70. NON_AUTO_SRCS :=
  71. NON_AUTO_SRCS += drivers/net/prism2.c
  72. ###############################################################################
  73. #
  74. # Default build target: build the most common targets and print out a
  75. # helpfully suggestive message
  76. #
  77. all : bin/blib.a bin/gpxe.dsk bin/gpxe.iso bin/gpxe.usb bin/undionly.kpxe
  78. @$(ECHO) '==========================================================='
  79. @$(ECHO)
  80. @$(ECHO) 'To create a bootable floppy, type'
  81. @$(ECHO) ' cat bin/gpxe.dsk > /dev/fd0'
  82. @$(ECHO) 'where /dev/fd0 is your floppy drive. This will erase any'
  83. @$(ECHO) 'data already on the disk.'
  84. @$(ECHO)
  85. @$(ECHO) 'To create a bootable USB key, type'
  86. @$(ECHO) ' cat bin/gpxe.usb > /dev/sdX'
  87. @$(ECHO) 'where /dev/sdX is your USB key, and is *not* a real hard'
  88. @$(ECHO) 'disk on your system. This will erase any data already on'
  89. @$(ECHO) 'the USB key.'
  90. @$(ECHO)
  91. @$(ECHO) 'To create a bootable CD-ROM, burn the ISO image '
  92. @$(ECHO) 'bin/gpxe.iso to a blank CD-ROM.'
  93. @$(ECHO)
  94. @$(ECHO) 'These images contain drivers for all supported cards. You'
  95. @$(ECHO) 'can build more customised images, and ROM images, using'
  96. @$(ECHO) ' make bin/<rom-name>.<output-format>'
  97. @$(ECHO)
  98. @$(ECHO) '==========================================================='
  99. ###############################################################################
  100. #
  101. # Build targets that do nothing but might be tried by users
  102. #
  103. configure :
  104. @$(ECHO) "No configuration needed."
  105. install :
  106. @$(ECHO) "No installation required."
  107. ###############################################################################
  108. #
  109. # Version number calculations
  110. #
  111. VERSION_MAJOR = 0
  112. VERSION_MINOR = 9
  113. VERSION_PATCH = 7
  114. EXTRAVERSION = +
  115. MM_VERSION = $(VERSION_MAJOR).$(VERSION_MINOR)
  116. VERSION = $(MM_VERSION).$(VERSION_PATCH)$(EXTRAVERSION)
  117. CFLAGS += -DVERSION_MAJOR=$(VERSION_MAJOR) \
  118. -DVERSION_MINOR=$(VERSION_MINOR) \
  119. -DVERSION_PATCH=$(VERSION_PATCH) \
  120. -DVERSION=\"$(VERSION)\"
  121. IDENT = '$(@F) $(VERSION) (GPL) etherboot.org'
  122. version :
  123. @$(ECHO) $(VERSION)
  124. ###############################################################################
  125. #
  126. # Drag in the bulk of the build system
  127. #
  128. MAKEDEPS += Makefile.housekeeping
  129. include Makefile.housekeeping