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.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  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 := /usr/bin/perl
  22. CC := $(CROSS_COMPILE)gcc
  23. CPP := $(CROSS_COMPILE)gcc -E -Wp,-Wall
  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 := $(PERL) ./util/parserom.pl
  33. MAKEROM := $(PERL) ./util/makerom.pl
  34. SYMCHECK := $(PERL) ./util/symcheck.pl
  35. SORTOBJDUMP := $(PERL) ./util/sortobjdump.pl
  36. NRV2B := ./util/nrv2b
  37. ZBIN := ./util/zbin
  38. ELF2EFI32 := ./util/elf2efi32
  39. ELF2EFI64 := ./util/elf2efi64
  40. EFIROM := ./util/efirom
  41. DOXYGEN := doxygen
  42. ###############################################################################
  43. #
  44. # SRCDIRS lists all directories containing source files.
  45. #
  46. SRCDIRS :=
  47. SRCDIRS += libgcc
  48. SRCDIRS += core
  49. SRCDIRS += proto
  50. SRCDIRS += net net/tcp net/udp
  51. SRCDIRS += image
  52. SRCDIRS += drivers/bus
  53. SRCDIRS += drivers/net
  54. SRCDIRS += drivers/net/e1000
  55. SRCDIRS += drivers/net/phantom
  56. SRCDIRS += drivers/block
  57. SRCDIRS += drivers/nvs
  58. SRCDIRS += drivers/bitbash
  59. SRCDIRS += drivers/infiniband
  60. SRCDIRS += interface/pxe interface/efi interface/smbios
  61. SRCDIRS += tests
  62. SRCDIRS += crypto crypto/axtls crypto/matrixssl
  63. SRCDIRS += hci hci/commands hci/tui
  64. SRCDIRS += hci/mucurses hci/mucurses/widgets
  65. SRCDIRS += usr
  66. # NON_AUTO_SRCS lists files that are excluded from the normal
  67. # automatic build system.
  68. #
  69. NON_AUTO_SRCS :=
  70. NON_AUTO_SRCS += drivers/net/prism2.c
  71. ###############################################################################
  72. #
  73. # Default build target: build the most common targets and print out a
  74. # helpfully suggestive message
  75. #
  76. all : bin/blib.a bin/gpxe.dsk bin/gpxe.iso bin/gpxe.usb bin/undionly.kpxe
  77. @$(ECHO) '==========================================================='
  78. @$(ECHO)
  79. @$(ECHO) 'To create a bootable floppy, type'
  80. @$(ECHO) ' cat bin/gpxe.dsk > /dev/fd0'
  81. @$(ECHO) 'where /dev/fd0 is your floppy drive. This will erase any'
  82. @$(ECHO) 'data already on the disk.'
  83. @$(ECHO)
  84. @$(ECHO) 'To create a bootable USB key, type'
  85. @$(ECHO) ' cat bin/gpxe.usb > /dev/sdX'
  86. @$(ECHO) 'where /dev/sdX is your USB key, and is *not* a real hard'
  87. @$(ECHO) 'disk on your system. This will erase any data already on'
  88. @$(ECHO) 'the USB key.'
  89. @$(ECHO)
  90. @$(ECHO) 'To create a bootable CD-ROM, burn the ISO image '
  91. @$(ECHO) 'bin/gpxe.iso to a blank CD-ROM.'
  92. @$(ECHO)
  93. @$(ECHO) 'These images contain drivers for all supported cards. You'
  94. @$(ECHO) 'can build more customised images, and ROM images, using'
  95. @$(ECHO) ' make bin/<rom-name>.<output-format>'
  96. @$(ECHO)
  97. @$(ECHO) '==========================================================='
  98. ###############################################################################
  99. #
  100. # Build targets that do nothing but might be tried by users
  101. #
  102. configure :
  103. @$(ECHO) "No configuration needed."
  104. install :
  105. @$(ECHO) "No installation required."
  106. ###############################################################################
  107. #
  108. # Version number calculations
  109. #
  110. VERSION_MAJOR = 0
  111. VERSION_MINOR = 9
  112. VERSION_PATCH = 7
  113. EXTRAVERSION =
  114. MM_VERSION = $(VERSION_MAJOR).$(VERSION_MINOR)
  115. VERSION = $(MM_VERSION).$(VERSION_PATCH)$(EXTRAVERSION)
  116. CFLAGS += -DVERSION_MAJOR=$(VERSION_MAJOR) \
  117. -DVERSION_MINOR=$(VERSION_MINOR) \
  118. -DVERSION_PATCH=$(VERSION_PATCH) \
  119. -DVERSION=\"$(VERSION)\"
  120. IDENT = '$(@F) $(VERSION) (GPL) etherboot.org'
  121. version :
  122. @$(ECHO) $(VERSION)
  123. ###############################################################################
  124. #
  125. # Drag in the bulk of the build system
  126. #
  127. MAKEDEPS += Makefile.housekeeping
  128. include Makefile.housekeeping