Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

Makefile 6.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207
  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. CSPLIT := csplit
  36. PARSEROM := ./util/parserom.pl
  37. FIXROM := ./util/fixrom.pl
  38. SYMCHECK := ./util/symcheck.pl
  39. SORTOBJDUMP := ./util/sortobjdump.pl
  40. PADIMG := ./util/padimg.pl
  41. LICENCE := ./util/licence.pl
  42. NRV2B := ./util/nrv2b
  43. ZBIN := ./util/zbin
  44. ELF2EFI32 := ./util/elf2efi32
  45. ELF2EFI64 := ./util/elf2efi64
  46. EFIROM := ./util/efirom
  47. ICCFIX := ./util/iccfix
  48. EINFO := ./util/einfo
  49. GENKEYMAP := ./util/genkeymap.pl
  50. DOXYGEN := doxygen
  51. LCAB := lcab
  52. BINUTILS_DIR := /usr
  53. BFD_DIR := $(BINUTILS_DIR)
  54. ZLIB_DIR := /usr
  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 += interface/pxe interface/efi interface/smbios
  83. SRCDIRS += interface/bofm
  84. SRCDIRS += interface/xen
  85. SRCDIRS += tests
  86. SRCDIRS += crypto crypto/axtls crypto/matrixssl
  87. SRCDIRS += hci hci/commands hci/tui
  88. SRCDIRS += hci/mucurses hci/mucurses/widgets
  89. SRCDIRS += hci/keymap
  90. SRCDIRS += usr
  91. SRCDIRS += config
  92. # NON_AUTO_SRCS lists files that are excluded from the normal
  93. # automatic build system.
  94. #
  95. NON_AUTO_SRCS :=
  96. NON_AUTO_SRCS += core/version.c
  97. NON_AUTO_SRCS += drivers/net/prism2.c
  98. # INCDIRS lists the include path
  99. #
  100. INCDIRS :=
  101. INCDIRS += include .
  102. ###############################################################################
  103. #
  104. # Default build target: build the most common targets and print out a
  105. # helpfully suggestive message
  106. #
  107. ALL := bin/blib.a bin/ipxe.dsk bin/ipxe.lkrn bin/ipxe.iso \
  108. bin/ipxe.usb bin/ipxe.pxe bin/undionly.kpxe bin/rtl8139.rom \
  109. bin/8086100e.mrom bin/80861209.rom bin/10500940.rom \
  110. bin/10222000.rom bin/10ec8139.rom bin/1af41000.rom \
  111. bin/8086100f.mrom bin/808610d3.mrom bin/15ad07b0.rom
  112. all : $(ALL)
  113. @$(ECHO) '==========================================================='
  114. @$(ECHO)
  115. @$(ECHO) 'To create a bootable floppy, type'
  116. @$(ECHO) ' cat bin/ipxe.dsk > /dev/fd0'
  117. @$(ECHO) 'where /dev/fd0 is your floppy drive. This will erase any'
  118. @$(ECHO) 'data already on the disk.'
  119. @$(ECHO)
  120. @$(ECHO) 'To create a bootable USB key, type'
  121. @$(ECHO) ' cat bin/ipxe.usb > /dev/sdX'
  122. @$(ECHO) 'where /dev/sdX is your USB key, and is *not* a real hard'
  123. @$(ECHO) 'disk on your system. This will erase any data already on'
  124. @$(ECHO) 'the USB key.'
  125. @$(ECHO)
  126. @$(ECHO) 'To create a bootable CD-ROM, burn the ISO image '
  127. @$(ECHO) 'bin/ipxe.iso to a blank CD-ROM.'
  128. @$(ECHO)
  129. @$(ECHO) 'These images contain drivers for all supported cards. You'
  130. @$(ECHO) 'can build more customised images, and ROM images, using'
  131. @$(ECHO) ' make bin/<rom-name>.<output-format>'
  132. @$(ECHO)
  133. @$(ECHO) '==========================================================='
  134. ###############################################################################
  135. #
  136. # Comprehensive build target: build a selection of cross-platform
  137. # targets to expose potential build errors that show up only on
  138. # certain platforms
  139. #
  140. everything :
  141. $(Q)$(MAKE) --no-print-directory $(ALL) \
  142. bin-i386-efi/ipxe.efi bin-i386-efi/ipxe.efidrv \
  143. bin-i386-efi/ipxe.efirom \
  144. bin-x86_64-efi/ipxe.efi bin-x86_64-efi/ipxe.efidrv \
  145. bin-x86_64-efi/ipxe.efirom \
  146. bin-i386-linux/tap.linux bin-x86_64-linux/tap.linux \
  147. bin-i386-linux/tests.linux bin-x86_64-linux/tests.linux
  148. ###############################################################################
  149. #
  150. # VMware build target: all ROMs used with VMware
  151. #
  152. vmware : bin/8086100f.mrom bin/808610d3.mrom bin/10222000.rom bin/15ad07b0.rom
  153. @$(ECHO) '==========================================================='
  154. @$(ECHO)
  155. @$(ECHO) 'Available ROMs:'
  156. @$(ECHO) ' bin/8086100f.mrom -- intel/e1000'
  157. @$(ECHO) ' bin/808610d3.mrom -- intel/e1000e'
  158. @$(ECHO) ' bin/10222000.rom -- vlance/pcnet32'
  159. @$(ECHO) ' bin/15ad07b0.rom -- vmxnet3'
  160. @$(ECHO)
  161. @$(ECHO) 'For more information, see http://ipxe.org/howto/vmware'
  162. @$(ECHO)
  163. @$(ECHO) '==========================================================='
  164. ###############################################################################
  165. #
  166. # Build targets that do nothing but might be tried by users
  167. #
  168. configure :
  169. @$(ECHO) "No configuration needed."
  170. install :
  171. @$(ECHO) "No installation required."
  172. ###############################################################################
  173. #
  174. # Version number calculations
  175. #
  176. VERSION_MAJOR = 1
  177. VERSION_MINOR = 0
  178. VERSION_PATCH = 0
  179. EXTRAVERSION = +
  180. MM_VERSION = $(VERSION_MAJOR).$(VERSION_MINOR)
  181. VERSION = $(MM_VERSION).$(VERSION_PATCH)$(EXTRAVERSION)
  182. ifneq ($(wildcard ../.git),)
  183. GITVERSION := $(shell git describe --always --abbrev=1 --match "" 2>/dev/null)
  184. VERSION += ($(GITVERSION))
  185. endif
  186. version :
  187. @$(ECHO) "$(VERSION)"
  188. ###############################################################################
  189. #
  190. # Drag in the bulk of the build system
  191. #
  192. MAKEDEPS += Makefile.housekeeping
  193. include Makefile.housekeeping