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 4.9KB

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