Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221
  1. ###############################################################################
  2. #
  3. # Initialise various variables
  4. #
  5. CLEANUP :=
  6. CFLAGS :=
  7. ASFLAGS :=
  8. LDFLAGS :=
  9. HOST_CFLAGS :=
  10. MAKEDEPS := Makefile
  11. CROSS_COMPILE ?= $(CROSS)
  12. ###############################################################################
  13. #
  14. # Locations of tools
  15. #
  16. HOST_CC := gcc
  17. RM := rm -f
  18. TOUCH := touch
  19. MKDIR := mkdir
  20. CP := cp
  21. ECHO := echo
  22. PRINTF := printf
  23. PERL := perl
  24. TRUE := true
  25. CC := $(CROSS_COMPILE)gcc
  26. CPP := $(CC) -E
  27. AS := $(CROSS_COMPILE)as
  28. LD := $(CROSS_COMPILE)ld
  29. SIZE := $(CROSS_COMPILE)size
  30. AR := $(CROSS_COMPILE)ar
  31. RANLIB := $(CROSS_COMPILE)ranlib
  32. OBJCOPY := $(CROSS_COMPILE)objcopy
  33. NM := $(CROSS_COMPILE)nm
  34. OBJDUMP := $(CROSS_COMPILE)objdump
  35. OPENSSL := openssl
  36. CSPLIT := csplit
  37. PARSEROM := ./util/parserom.pl
  38. FIXROM := ./util/fixrom.pl
  39. SYMCHECK := ./util/symcheck.pl
  40. SORTOBJDUMP := ./util/sortobjdump.pl
  41. PADIMG := ./util/padimg.pl
  42. LICENCE := ./util/licence.pl
  43. NRV2B := ./util/nrv2b
  44. ZBIN := ./util/zbin
  45. ELF2EFI32 := ./util/elf2efi32
  46. ELF2EFI64 := ./util/elf2efi64
  47. EFIROM := ./util/efirom
  48. EFIFATBIN := ./util/efifatbin
  49. ICCFIX := ./util/iccfix
  50. EINFO := ./util/einfo
  51. GENKEYMAP := ./util/genkeymap.pl
  52. DOXYGEN := doxygen
  53. LCAB := lcab
  54. QEMUIMG := qemu-img
  55. ###############################################################################
  56. #
  57. # SRCDIRS lists all directories containing source files.
  58. #
  59. SRCDIRS :=
  60. SRCDIRS += libgcc
  61. SRCDIRS += core
  62. SRCDIRS += net net/oncrpc net/tcp net/udp net/infiniband net/80211
  63. SRCDIRS += image
  64. SRCDIRS += drivers/bus
  65. SRCDIRS += drivers/net
  66. SRCDIRS += drivers/net/e1000
  67. SRCDIRS += drivers/net/e1000e
  68. SRCDIRS += drivers/net/igb
  69. SRCDIRS += drivers/net/igbvf
  70. SRCDIRS += drivers/net/phantom
  71. SRCDIRS += drivers/net/rtl818x
  72. SRCDIRS += drivers/net/ath
  73. SRCDIRS += drivers/net/ath/ath5k
  74. SRCDIRS += drivers/net/ath/ath9k
  75. SRCDIRS += drivers/net/vxge
  76. SRCDIRS += drivers/net/efi
  77. SRCDIRS += drivers/net/tg3
  78. SRCDIRS += drivers/block
  79. SRCDIRS += drivers/nvs
  80. SRCDIRS += drivers/bitbash
  81. SRCDIRS += drivers/infiniband
  82. SRCDIRS += drivers/infiniband/mlx_utils_flexboot/src
  83. SRCDIRS += drivers/infiniband/mlx_utils/src/public
  84. SRCDIRS += drivers/infiniband/mlx_utils/mlx_lib/mlx_reg_access
  85. SRCDIRS += drivers/infiniband/mlx_utils/mlx_lib/mlx_nvconfig
  86. SRCDIRS += drivers/infiniband/mlx_utils/mlx_lib/mlx_vmac
  87. SRCDIRS += drivers/infiniband/mlx_utils/mlx_lib/mlx_blink_leds
  88. SRCDIRS += drivers/infiniband/mlx_utils/mlx_lib/mlx_link_speed
  89. SRCDIRS += drivers/infiniband/mlx_nodnic/src
  90. SRCDIRS += drivers/usb
  91. SRCDIRS += interface/pxe interface/efi interface/smbios
  92. SRCDIRS += interface/bofm
  93. SRCDIRS += interface/xen
  94. SRCDIRS += interface/hyperv
  95. SRCDIRS += tests
  96. SRCDIRS += crypto crypto/mishmash
  97. SRCDIRS += hci hci/commands hci/tui
  98. SRCDIRS += hci/mucurses hci/mucurses/widgets
  99. SRCDIRS += hci/keymap
  100. SRCDIRS += usr
  101. SRCDIRS += config
  102. # NON_AUTO_SRCS lists files that are excluded from the normal
  103. # automatic build system.
  104. #
  105. NON_AUTO_SRCS :=
  106. NON_AUTO_SRCS += core/version.c
  107. NON_AUTO_SRCS += drivers/net/prism2.c
  108. # INCDIRS lists the include path
  109. #
  110. INCDIRS :=
  111. INCDIRS += include .
  112. ###############################################################################
  113. #
  114. # Default build target: build the most common targets and print out a
  115. # helpfully suggestive message
  116. #
  117. ALL := bin/blib.a bin/ipxe.dsk bin/ipxe.lkrn bin/ipxe.iso \
  118. bin/ipxe.usb bin/ipxe.pxe bin/undionly.kpxe bin/rtl8139.rom \
  119. bin/8086100e.mrom bin/80861209.rom bin/10500940.rom \
  120. bin/10222000.rom bin/10ec8139.rom bin/1af41000.rom \
  121. bin/8086100f.mrom bin/808610d3.mrom bin/15ad07b0.rom
  122. all : $(ALL)
  123. @$(ECHO) '==========================================================='
  124. @$(ECHO)
  125. @$(ECHO) 'To create a bootable floppy, type'
  126. @$(ECHO) ' cat bin/ipxe.dsk > /dev/fd0'
  127. @$(ECHO) 'where /dev/fd0 is your floppy drive. This will erase any'
  128. @$(ECHO) 'data already on the disk.'
  129. @$(ECHO)
  130. @$(ECHO) 'To create a bootable USB key, type'
  131. @$(ECHO) ' cat bin/ipxe.usb > /dev/sdX'
  132. @$(ECHO) 'where /dev/sdX is your USB key, and is *not* a real hard'
  133. @$(ECHO) 'disk on your system. This will erase any data already on'
  134. @$(ECHO) 'the USB key.'
  135. @$(ECHO)
  136. @$(ECHO) 'To create a bootable CD-ROM, burn the ISO image '
  137. @$(ECHO) 'bin/ipxe.iso to a blank CD-ROM.'
  138. @$(ECHO)
  139. @$(ECHO) 'These images contain drivers for all supported cards. You'
  140. @$(ECHO) 'can build more customised images, and ROM images, using'
  141. @$(ECHO) ' make bin/<rom-name>.<output-format>'
  142. @$(ECHO)
  143. @$(ECHO) '==========================================================='
  144. ###############################################################################
  145. #
  146. # Comprehensive build target: build a selection of cross-platform
  147. # targets to expose potential build errors that show up only on
  148. # certain platforms
  149. #
  150. everything :
  151. $(Q)$(MAKE) --no-print-directory $(ALL) \
  152. bin/3c509.rom bin/intel.rom bin/intel.mrom \
  153. bin-x86_64-pcbios/8086100e.mrom bin-x86_64-pcbios/intel.rom \
  154. bin-x86_64-pcbios/ipxe.usb bin-x86_64-pcbios/ipxe.pxe \
  155. bin-x86_64-pcbios/undionly.kpxe \
  156. bin-i386-efi/ipxe.efi bin-i386-efi/ipxe.efidrv \
  157. bin-i386-efi/ipxe.efirom \
  158. bin-x86_64-efi/ipxe.efi bin-x86_64-efi/ipxe.efidrv \
  159. bin-x86_64-efi/ipxe.efirom \
  160. bin-i386-linux/tap.linux bin-x86_64-linux/tap.linux \
  161. bin-i386-linux/tests.linux bin-x86_64-linux/tests.linux
  162. ###############################################################################
  163. #
  164. # VMware build target: all ROMs used with VMware
  165. #
  166. vmware : bin/8086100f.mrom bin/808610d3.mrom bin/10222000.rom bin/15ad07b0.rom
  167. @$(ECHO) '==========================================================='
  168. @$(ECHO)
  169. @$(ECHO) 'Available ROMs:'
  170. @$(ECHO) ' bin/8086100f.mrom -- intel/e1000'
  171. @$(ECHO) ' bin/808610d3.mrom -- intel/e1000e'
  172. @$(ECHO) ' bin/10222000.rom -- vlance/pcnet32'
  173. @$(ECHO) ' bin/15ad07b0.rom -- vmxnet3'
  174. @$(ECHO)
  175. @$(ECHO) 'For more information, see http://ipxe.org/howto/vmware'
  176. @$(ECHO)
  177. @$(ECHO) '==========================================================='
  178. ###############################################################################
  179. #
  180. # Build targets that do nothing but might be tried by users
  181. #
  182. configure :
  183. @$(ECHO) "No configuration needed."
  184. install :
  185. @$(ECHO) "No installation required."
  186. ###############################################################################
  187. #
  188. # Version number calculations
  189. #
  190. VERSION_MAJOR = 1
  191. VERSION_MINOR = 0
  192. VERSION_PATCH = 0
  193. EXTRAVERSION = +
  194. MM_VERSION = $(VERSION_MAJOR).$(VERSION_MINOR)
  195. VERSION = $(MM_VERSION).$(VERSION_PATCH)$(EXTRAVERSION)
  196. ifneq ($(wildcard ../.git),)
  197. GITVERSION := $(shell git describe --always --abbrev=1 --match "" 2>/dev/null)
  198. VERSION += ($(GITVERSION))
  199. endif
  200. version :
  201. @$(ECHO) "$(VERSION)"
  202. ###############################################################################
  203. #
  204. # Drag in the bulk of the build system
  205. #
  206. MAKEDEPS += Makefile.housekeeping
  207. include Makefile.housekeeping