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.

Makefile 4.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  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. CC := $(CROSS_COMPILE)gcc
  23. CPP := $(CC) -E
  24. AS := $(CROSS_COMPILE)as
  25. LD := $(CROSS_COMPILE)ld
  26. SIZE := $(CROSS_COMPILE)size
  27. AR := $(CROSS_COMPILE)ar
  28. RANLIB := $(CROSS_COMPILE)ranlib
  29. OBJCOPY := $(CROSS_COMPILE)objcopy
  30. NM := $(CROSS_COMPILE)nm
  31. OBJDUMP := $(CROSS_COMPILE)objdump
  32. PARSEROM := ./util/parserom.pl
  33. FIXROM := ./util/fixrom.pl
  34. SYMCHECK := ./util/symcheck.pl
  35. SORTOBJDUMP := ./util/sortobjdump.pl
  36. PADIMG := ./util/padimg.pl
  37. LICENCE := ./util/licence.pl
  38. NRV2B := ./util/nrv2b
  39. ZBIN := ./util/zbin
  40. ELF2EFI32 := ./util/elf2efi32
  41. ELF2EFI64 := ./util/elf2efi64
  42. EFIROM := ./util/efirom
  43. ICCFIX := ./util/iccfix
  44. EINFO := ./util/einfo
  45. DOXYGEN := doxygen
  46. BINUTILS_DIR := /usr
  47. BFD_DIR := $(BINUTILS_DIR)
  48. ZLIB_DIR := /usr
  49. ###############################################################################
  50. #
  51. # SRCDIRS lists all directories containing source files.
  52. #
  53. SRCDIRS :=
  54. SRCDIRS += libgcc
  55. SRCDIRS += core
  56. SRCDIRS += net net/tcp net/udp net/infiniband net/80211
  57. SRCDIRS += image
  58. SRCDIRS += drivers/bus
  59. SRCDIRS += drivers/net
  60. SRCDIRS += drivers/net/e1000
  61. SRCDIRS += drivers/net/e1000e
  62. SRCDIRS += drivers/net/igb
  63. SRCDIRS += drivers/net/phantom
  64. SRCDIRS += drivers/net/rtl818x
  65. SRCDIRS += drivers/net/ath5k
  66. SRCDIRS += drivers/net/vxge
  67. SRCDIRS += drivers/net/efi
  68. SRCDIRS += drivers/block
  69. SRCDIRS += drivers/nvs
  70. SRCDIRS += drivers/bitbash
  71. SRCDIRS += drivers/infiniband
  72. SRCDIRS += interface/pxe interface/efi interface/smbios
  73. SRCDIRS += tests
  74. SRCDIRS += crypto crypto/axtls crypto/matrixssl
  75. SRCDIRS += hci hci/commands hci/tui
  76. SRCDIRS += hci/mucurses hci/mucurses/widgets
  77. SRCDIRS += usr
  78. SRCDIRS += config
  79. # NON_AUTO_SRCS lists files that are excluded from the normal
  80. # automatic build system.
  81. #
  82. NON_AUTO_SRCS :=
  83. NON_AUTO_SRCS += drivers/net/prism2.c
  84. # INCDIRS lists the include path
  85. #
  86. INCDIRS :=
  87. INCDIRS += include .
  88. ###############################################################################
  89. #
  90. # Default build target: build the most common targets and print out a
  91. # helpfully suggestive message
  92. #
  93. all : bin/blib.a bin/ipxe.dsk bin/ipxe.iso bin/ipxe.usb bin/undionly.kpxe \
  94. bin/rtl8139.rom
  95. @$(ECHO) '==========================================================='
  96. @$(ECHO)
  97. @$(ECHO) 'To create a bootable floppy, type'
  98. @$(ECHO) ' cat bin/ipxe.dsk > /dev/fd0'
  99. @$(ECHO) 'where /dev/fd0 is your floppy drive. This will erase any'
  100. @$(ECHO) 'data already on the disk.'
  101. @$(ECHO)
  102. @$(ECHO) 'To create a bootable USB key, type'
  103. @$(ECHO) ' cat bin/ipxe.usb > /dev/sdX'
  104. @$(ECHO) 'where /dev/sdX is your USB key, and is *not* a real hard'
  105. @$(ECHO) 'disk on your system. This will erase any data already on'
  106. @$(ECHO) 'the USB key.'
  107. @$(ECHO)
  108. @$(ECHO) 'To create a bootable CD-ROM, burn the ISO image '
  109. @$(ECHO) 'bin/ipxe.iso to a blank CD-ROM.'
  110. @$(ECHO)
  111. @$(ECHO) 'These images contain drivers for all supported cards. You'
  112. @$(ECHO) 'can build more customised images, and ROM images, using'
  113. @$(ECHO) ' make bin/<rom-name>.<output-format>'
  114. @$(ECHO)
  115. @$(ECHO) '==========================================================='
  116. ###############################################################################
  117. #
  118. # Build targets that do nothing but might be tried by users
  119. #
  120. configure :
  121. @$(ECHO) "No configuration needed."
  122. install :
  123. @$(ECHO) "No installation required."
  124. ###############################################################################
  125. #
  126. # Version number calculations
  127. #
  128. VERSION_MAJOR = 1
  129. VERSION_MINOR = 0
  130. VERSION_PATCH = 0
  131. EXTRAVERSION = +
  132. MM_VERSION = $(VERSION_MAJOR).$(VERSION_MINOR)
  133. VERSION = $(MM_VERSION).$(VERSION_PATCH)$(EXTRAVERSION)
  134. CFLAGS += -DVERSION_MAJOR=$(VERSION_MAJOR) \
  135. -DVERSION_MINOR=$(VERSION_MINOR) \
  136. -DVERSION_PATCH=$(VERSION_PATCH) \
  137. -DVERSION=\"$(VERSION)\"
  138. IDENT = '$(@F) $(VERSION) (GPL) ipxe.org'
  139. version :
  140. @$(ECHO) $(VERSION)
  141. ###############################################################################
  142. #
  143. # Drag in the bulk of the build system
  144. #
  145. MAKEDEPS += Makefile.housekeeping
  146. include Makefile.housekeeping