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.2KB

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