You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  1. ###############################################################################
  2. #
  3. # Initialise various variables
  4. #
  5. CLEANUP :=
  6. CFLAGS :=
  7. ASFLAGS :=
  8. LDFLAGS :=
  9. MAKEDEPS := Makefile
  10. ###############################################################################
  11. #
  12. # Locations of tools
  13. #
  14. HOST_CC := gcc
  15. RM := rm -f
  16. TOUCH := touch
  17. MKDIR := mkdir
  18. CP := cp
  19. ECHO := echo
  20. PRINTF := printf
  21. PERL := perl
  22. TRUE := true
  23. CC := $(CROSS_COMPILE)gcc
  24. CPP := $(CC) -E
  25. AS := $(CROSS_COMPILE)as
  26. LD := $(CROSS_COMPILE)ld
  27. SIZE := $(CROSS_COMPILE)size
  28. AR := $(CROSS_COMPILE)ar
  29. RANLIB := $(CROSS_COMPILE)ranlib
  30. OBJCOPY := $(CROSS_COMPILE)objcopy
  31. NM := $(CROSS_COMPILE)nm
  32. OBJDUMP := $(CROSS_COMPILE)objdump
  33. OPENSSL := openssl
  34. PARSEROM := ./util/parserom.pl
  35. FIXROM := ./util/fixrom.pl
  36. SYMCHECK := ./util/symcheck.pl
  37. SORTOBJDUMP := ./util/sortobjdump.pl
  38. PADIMG := ./util/padimg.pl
  39. LICENCE := ./util/licence.pl
  40. NRV2B := ./util/nrv2b
  41. ZBIN := ./util/zbin
  42. ELF2EFI32 := ./util/elf2efi32
  43. ELF2EFI64 := ./util/elf2efi64
  44. EFIROM := ./util/efirom
  45. ICCFIX := ./util/iccfix
  46. EINFO := ./util/einfo
  47. GENKEYMAP := ./util/genkeymap.pl
  48. DOXYGEN := doxygen
  49. BINUTILS_DIR := /usr
  50. BFD_DIR := $(BINUTILS_DIR)
  51. ZLIB_DIR := /usr
  52. ###############################################################################
  53. #
  54. # SRCDIRS lists all directories containing source files.
  55. #
  56. SRCDIRS :=
  57. SRCDIRS += libgcc
  58. SRCDIRS += core
  59. SRCDIRS += net net/tcp net/udp net/infiniband net/80211
  60. SRCDIRS += image
  61. SRCDIRS += drivers/bus
  62. SRCDIRS += drivers/net
  63. SRCDIRS += drivers/net/e1000
  64. SRCDIRS += drivers/net/e1000e
  65. SRCDIRS += drivers/net/igb
  66. SRCDIRS += drivers/net/igbvf
  67. SRCDIRS += drivers/net/phantom
  68. SRCDIRS += drivers/net/rtl818x
  69. SRCDIRS += drivers/net/ath
  70. SRCDIRS += drivers/net/ath/ath5k
  71. SRCDIRS += drivers/net/ath/ath9k
  72. SRCDIRS += drivers/net/vxge
  73. SRCDIRS += drivers/net/efi
  74. SRCDIRS += drivers/net/tg3
  75. SRCDIRS += drivers/block
  76. SRCDIRS += drivers/nvs
  77. SRCDIRS += drivers/bitbash
  78. SRCDIRS += drivers/infiniband
  79. SRCDIRS += interface/pxe interface/efi interface/smbios
  80. SRCDIRS += interface/bofm
  81. SRCDIRS += tests
  82. SRCDIRS += crypto crypto/axtls crypto/matrixssl
  83. SRCDIRS += hci hci/commands hci/tui
  84. SRCDIRS += hci/mucurses hci/mucurses/widgets
  85. SRCDIRS += hci/keymap
  86. SRCDIRS += usr
  87. SRCDIRS += config
  88. # NON_AUTO_SRCS lists files that are excluded from the normal
  89. # automatic build system.
  90. #
  91. NON_AUTO_SRCS :=
  92. NON_AUTO_SRCS += drivers/net/prism2.c
  93. # INCDIRS lists the include path
  94. #
  95. INCDIRS :=
  96. INCDIRS += include .
  97. ###############################################################################
  98. #
  99. # Default build target: build the most common targets and print out a
  100. # helpfully suggestive message
  101. #
  102. ALL := bin/blib.a bin/ipxe.dsk bin/ipxe.lkrn bin/ipxe.iso \
  103. bin/ipxe.usb bin/undionly.kpxe bin/rtl8139.rom
  104. all : $(ALL)
  105. @$(ECHO) '==========================================================='
  106. @$(ECHO)
  107. @$(ECHO) 'To create a bootable floppy, type'
  108. @$(ECHO) ' cat bin/ipxe.dsk > /dev/fd0'
  109. @$(ECHO) 'where /dev/fd0 is your floppy drive. This will erase any'
  110. @$(ECHO) 'data already on the disk.'
  111. @$(ECHO)
  112. @$(ECHO) 'To create a bootable USB key, type'
  113. @$(ECHO) ' cat bin/ipxe.usb > /dev/sdX'
  114. @$(ECHO) 'where /dev/sdX is your USB key, and is *not* a real hard'
  115. @$(ECHO) 'disk on your system. This will erase any data already on'
  116. @$(ECHO) 'the USB key.'
  117. @$(ECHO)
  118. @$(ECHO) 'To create a bootable CD-ROM, burn the ISO image '
  119. @$(ECHO) 'bin/ipxe.iso to a blank CD-ROM.'
  120. @$(ECHO)
  121. @$(ECHO) 'These images contain drivers for all supported cards. You'
  122. @$(ECHO) 'can build more customised images, and ROM images, using'
  123. @$(ECHO) ' make bin/<rom-name>.<output-format>'
  124. @$(ECHO)
  125. @$(ECHO) '==========================================================='
  126. ###############################################################################
  127. #
  128. # Comprehensive build target: build a selection of cross-platform
  129. # targets to expose potential build errors that show up only on
  130. # certain platforms
  131. #
  132. everything :
  133. $(Q)$(MAKE) --no-print-directory $(ALL) \
  134. bin-i386-efi/ipxe.efi bin-i386-efi/ipxe.efidrv \
  135. bin-i386-efi/ipxe.efirom \
  136. bin-x86_64-efi/ipxe.efi bin-x86_64-efi/ipxe.efidrv \
  137. bin-x86_64-efi/ipxe.efirom \
  138. bin-i386-linux/tap.linux bin-x86_64-linux/tap.linux
  139. ###############################################################################
  140. #
  141. # Build targets that do nothing but might be tried by users
  142. #
  143. configure :
  144. @$(ECHO) "No configuration needed."
  145. install :
  146. @$(ECHO) "No installation required."
  147. ###############################################################################
  148. #
  149. # Version number calculations
  150. #
  151. VERSION_MAJOR = 1
  152. VERSION_MINOR = 0
  153. VERSION_PATCH = 0
  154. EXTRAVERSION = +
  155. MM_VERSION = $(VERSION_MAJOR).$(VERSION_MINOR)
  156. VERSION = $(MM_VERSION).$(VERSION_PATCH)$(EXTRAVERSION)
  157. CFLAGS += -DVERSION_MAJOR=$(VERSION_MAJOR) \
  158. -DVERSION_MINOR=$(VERSION_MINOR) \
  159. -DVERSION_PATCH=$(VERSION_PATCH) \
  160. -DVERSION=\"$(VERSION)\"
  161. IDENT = '$(@F) $(VERSION) (GPL) ipxe.org'
  162. version :
  163. @$(ECHO) $(VERSION)
  164. ###############################################################################
  165. #
  166. # Drag in the bulk of the build system
  167. #
  168. MAKEDEPS += Makefile.housekeeping
  169. include Makefile.housekeeping