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

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