1 ###############################################################################
3 # Initialise various variables
12 ###############################################################################
24 CC := $(CROSS_COMPILE)gcc
26 AS := $(CROSS_COMPILE)as
27 LD := $(CROSS_COMPILE)ld
28 SIZE := $(CROSS_COMPILE)size
29 AR := $(CROSS_COMPILE)ar
30 RANLIB := $(CROSS_COMPILE)ranlib
31 OBJCOPY := $(CROSS_COMPILE)objcopy
32 NM := $(CROSS_COMPILE)nm
33 OBJDUMP := $(CROSS_COMPILE)objdump
34 PARSEROM := $(PERL) ./util/parserom.pl
35 MAKEROM := $(PERL) ./util/makerom.pl
36 SYMCHECK := $(PERL) ./util/symcheck.pl
37 SORTOBJDUMP := $(PERL) ./util/sortobjdump.pl
40 ELF2EFI32 := ./util/elf2efi32
41 ELF2EFI64 := ./util/elf2efi64
42 EFIROM := ./util/efirom
43 ICCFIX := ./util/iccfix
46 BFD_DIR := $(BINUTILS_DIR)
48 ###############################################################################
50 # SRCDIRS lists all directories containing source files.
56 SRCDIRS += net net/tcp net/udp
58 SRCDIRS += drivers/bus
59 SRCDIRS += drivers/net
60 SRCDIRS += drivers/net/e1000
61 SRCDIRS += drivers/net/phantom
62 SRCDIRS += drivers/block
63 SRCDIRS += drivers/nvs
64 SRCDIRS += drivers/bitbash
65 SRCDIRS += drivers/infiniband
66 SRCDIRS += interface/pxe interface/efi interface/smbios
68 SRCDIRS += crypto crypto/axtls crypto/matrixssl
69 SRCDIRS += hci hci/commands hci/tui
70 SRCDIRS += hci/mucurses hci/mucurses/widgets
73 # NON_AUTO_SRCS lists files that are excluded from the normal
74 # automatic build system.
77 NON_AUTO_SRCS += drivers/net/prism2.c
79 ###############################################################################
81 # Default build target: build the most common targets and print out a
82 # helpfully suggestive message
84 all : bin/blib.a bin/gpxe.dsk bin/gpxe.iso bin/gpxe.usb bin/undionly.kpxe
85 @$(ECHO) '==========================================================='
87 @$(ECHO) 'To create a bootable floppy, type'
88 @$(ECHO) ' cat bin/gpxe.dsk > /dev/fd0'
89 @$(ECHO) 'where /dev/fd0 is your floppy drive. This will erase any'
90 @$(ECHO) 'data already on the disk.'
92 @$(ECHO) 'To create a bootable USB key, type'
93 @$(ECHO) ' cat bin/gpxe.usb > /dev/sdX'
94 @$(ECHO) 'where /dev/sdX is your USB key, and is *not* a real hard'
95 @$(ECHO) 'disk on your system. This will erase any data already on'
96 @$(ECHO) 'the USB key.'
98 @$(ECHO) 'To create a bootable CD-ROM, burn the ISO image '
99 @$(ECHO) 'bin/gpxe.iso to a blank CD-ROM.'
101 @$(ECHO) 'These images contain drivers for all supported cards. You'
102 @$(ECHO) 'can build more customised images, and ROM images, using'
103 @$(ECHO) ' make bin/<rom-name>.<output-format>'
105 @$(ECHO) '==========================================================='
107 ###############################################################################
109 # Build targets that do nothing but might be tried by users
112 @$(ECHO) "No configuration needed."
115 @$(ECHO) "No installation required."
117 ###############################################################################
119 # Version number calculations
125 MM_VERSION = $(VERSION_MAJOR).$(VERSION_MINOR)
126 VERSION = $(MM_VERSION).$(VERSION_PATCH)$(EXTRAVERSION)
127 CFLAGS += -DVERSION_MAJOR=$(VERSION_MAJOR) \
128 -DVERSION_MINOR=$(VERSION_MINOR) \
129 -DVERSION_PATCH=$(VERSION_PATCH) \
130 -DVERSION=\"$(VERSION)\"
131 IDENT = '$(@F) $(VERSION) (GPL) etherboot.org'
135 ###############################################################################
137 # Drag in the bulk of the build system
140 MAKEDEPS += Makefile.housekeeping
141 include Makefile.housekeeping