Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

Makefile 6.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220
  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. ###############################################################################
  55. #
  56. # SRCDIRS lists all directories containing source files.
  57. #
  58. SRCDIRS :=
  59. SRCDIRS += libgcc
  60. SRCDIRS += core
  61. SRCDIRS += net net/oncrpc net/tcp net/udp net/infiniband net/80211
  62. SRCDIRS += image
  63. SRCDIRS += drivers/bus
  64. SRCDIRS += drivers/net
  65. SRCDIRS += drivers/net/e1000
  66. SRCDIRS += drivers/net/e1000e
  67. SRCDIRS += drivers/net/igb
  68. SRCDIRS += drivers/net/igbvf
  69. SRCDIRS += drivers/net/phantom
  70. SRCDIRS += drivers/net/rtl818x
  71. SRCDIRS += drivers/net/ath
  72. SRCDIRS += drivers/net/ath/ath5k
  73. SRCDIRS += drivers/net/ath/ath9k
  74. SRCDIRS += drivers/net/vxge
  75. SRCDIRS += drivers/net/efi
  76. SRCDIRS += drivers/net/tg3
  77. SRCDIRS += drivers/block
  78. SRCDIRS += drivers/nvs
  79. SRCDIRS += drivers/bitbash
  80. SRCDIRS += drivers/infiniband
  81. SRCDIRS += drivers/infiniband/mlx_utils_flexboot/src
  82. SRCDIRS += drivers/infiniband/mlx_utils/src/public
  83. SRCDIRS += drivers/infiniband/mlx_utils/mlx_lib/mlx_reg_access
  84. SRCDIRS += drivers/infiniband/mlx_utils/mlx_lib/mlx_nvconfig
  85. SRCDIRS += drivers/infiniband/mlx_utils/mlx_lib/mlx_vmac
  86. SRCDIRS += drivers/infiniband/mlx_utils/mlx_lib/mlx_blink_leds
  87. SRCDIRS += drivers/infiniband/mlx_utils/mlx_lib/mlx_link_speed
  88. SRCDIRS += drivers/infiniband/mlx_nodnic/src
  89. SRCDIRS += drivers/usb
  90. SRCDIRS += interface/pxe interface/efi interface/smbios
  91. SRCDIRS += interface/bofm
  92. SRCDIRS += interface/xen
  93. SRCDIRS += interface/hyperv
  94. SRCDIRS += tests
  95. SRCDIRS += crypto crypto/mishmash
  96. SRCDIRS += hci hci/commands hci/tui
  97. SRCDIRS += hci/mucurses hci/mucurses/widgets
  98. SRCDIRS += hci/keymap
  99. SRCDIRS += usr
  100. SRCDIRS += config
  101. # NON_AUTO_SRCS lists files that are excluded from the normal
  102. # automatic build system.
  103. #
  104. NON_AUTO_SRCS :=
  105. NON_AUTO_SRCS += core/version.c
  106. NON_AUTO_SRCS += drivers/net/prism2.c
  107. # INCDIRS lists the include path
  108. #
  109. INCDIRS :=
  110. INCDIRS += include .
  111. ###############################################################################
  112. #
  113. # Default build target: build the most common targets and print out a
  114. # helpfully suggestive message
  115. #
  116. ALL := bin/blib.a bin/ipxe.dsk bin/ipxe.lkrn bin/ipxe.iso \
  117. bin/ipxe.usb bin/ipxe.pxe bin/undionly.kpxe bin/rtl8139.rom \
  118. bin/8086100e.mrom bin/80861209.rom bin/10500940.rom \
  119. bin/10222000.rom bin/10ec8139.rom bin/1af41000.rom \
  120. bin/8086100f.mrom bin/808610d3.mrom bin/15ad07b0.rom
  121. all : $(ALL)
  122. @$(ECHO) '==========================================================='
  123. @$(ECHO)
  124. @$(ECHO) 'To create a bootable floppy, type'
  125. @$(ECHO) ' cat bin/ipxe.dsk > /dev/fd0'
  126. @$(ECHO) 'where /dev/fd0 is your floppy drive. This will erase any'
  127. @$(ECHO) 'data already on the disk.'
  128. @$(ECHO)
  129. @$(ECHO) 'To create a bootable USB key, type'
  130. @$(ECHO) ' cat bin/ipxe.usb > /dev/sdX'
  131. @$(ECHO) 'where /dev/sdX is your USB key, and is *not* a real hard'
  132. @$(ECHO) 'disk on your system. This will erase any data already on'
  133. @$(ECHO) 'the USB key.'
  134. @$(ECHO)
  135. @$(ECHO) 'To create a bootable CD-ROM, burn the ISO image '
  136. @$(ECHO) 'bin/ipxe.iso to a blank CD-ROM.'
  137. @$(ECHO)
  138. @$(ECHO) 'These images contain drivers for all supported cards. You'
  139. @$(ECHO) 'can build more customised images, and ROM images, using'
  140. @$(ECHO) ' make bin/<rom-name>.<output-format>'
  141. @$(ECHO)
  142. @$(ECHO) '==========================================================='
  143. ###############################################################################
  144. #
  145. # Comprehensive build target: build a selection of cross-platform
  146. # targets to expose potential build errors that show up only on
  147. # certain platforms
  148. #
  149. everything :
  150. $(Q)$(MAKE) --no-print-directory $(ALL) \
  151. bin/3c509.rom bin/intel.rom bin/intel.mrom \
  152. bin-x86_64-pcbios/8086100e.mrom bin-x86_64-pcbios/intel.rom \
  153. bin-x86_64-pcbios/ipxe.usb bin-x86_64-pcbios/ipxe.pxe \
  154. bin-x86_64-pcbios/undionly.kpxe \
  155. bin-i386-efi/ipxe.efi bin-i386-efi/ipxe.efidrv \
  156. bin-i386-efi/ipxe.efirom \
  157. bin-x86_64-efi/ipxe.efi bin-x86_64-efi/ipxe.efidrv \
  158. bin-x86_64-efi/ipxe.efirom \
  159. bin-i386-linux/tap.linux bin-x86_64-linux/tap.linux \
  160. bin-i386-linux/tests.linux bin-x86_64-linux/tests.linux
  161. ###############################################################################
  162. #
  163. # VMware build target: all ROMs used with VMware
  164. #
  165. vmware : bin/8086100f.mrom bin/808610d3.mrom bin/10222000.rom bin/15ad07b0.rom
  166. @$(ECHO) '==========================================================='
  167. @$(ECHO)
  168. @$(ECHO) 'Available ROMs:'
  169. @$(ECHO) ' bin/8086100f.mrom -- intel/e1000'
  170. @$(ECHO) ' bin/808610d3.mrom -- intel/e1000e'
  171. @$(ECHO) ' bin/10222000.rom -- vlance/pcnet32'
  172. @$(ECHO) ' bin/15ad07b0.rom -- vmxnet3'
  173. @$(ECHO)
  174. @$(ECHO) 'For more information, see http://ipxe.org/howto/vmware'
  175. @$(ECHO)
  176. @$(ECHO) '==========================================================='
  177. ###############################################################################
  178. #
  179. # Build targets that do nothing but might be tried by users
  180. #
  181. configure :
  182. @$(ECHO) "No configuration needed."
  183. install :
  184. @$(ECHO) "No installation required."
  185. ###############################################################################
  186. #
  187. # Version number calculations
  188. #
  189. VERSION_MAJOR = 1
  190. VERSION_MINOR = 0
  191. VERSION_PATCH = 0
  192. EXTRAVERSION = +
  193. MM_VERSION = $(VERSION_MAJOR).$(VERSION_MINOR)
  194. VERSION = $(MM_VERSION).$(VERSION_PATCH)$(EXTRAVERSION)
  195. ifneq ($(wildcard ../.git),)
  196. GITVERSION := $(shell git describe --always --abbrev=1 --match "" 2>/dev/null)
  197. VERSION += ($(GITVERSION))
  198. endif
  199. version :
  200. @$(ECHO) "$(VERSION)"
  201. ###############################################################################
  202. #
  203. # Drag in the bulk of the build system
  204. #
  205. MAKEDEPS += Makefile.housekeeping
  206. include Makefile.housekeeping