Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

Makefile 5.8KB

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