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
38 PADIMG := $(PERL) ./util/padimg.pl
39 LICENCE := $(PERL) ./util/licence.pl
42 ELF2EFI32 := ./util/elf2efi32
43 ELF2EFI64 := ./util/elf2efi64
44 EFIROM := ./util/efirom
45 ICCFIX := ./util/iccfix
48 BFD_DIR := $(BINUTILS_DIR)
50 ###############################################################################
52 # SRCDIRS lists all directories containing source files.
57 SRCDIRS += net net/tcp net/udp net/infiniband net/80211
59 SRCDIRS += drivers/bus
60 SRCDIRS += drivers/net
61 SRCDIRS += drivers/net/e1000
62 SRCDIRS += drivers/net/phantom
63 SRCDIRS += drivers/net/rtl818x
64 SRCDIRS += drivers/net/ath5k
65 SRCDIRS += drivers/block
66 SRCDIRS += drivers/nvs
67 SRCDIRS += drivers/bitbash
68 SRCDIRS += drivers/infiniband
69 SRCDIRS += interface/pxe interface/efi interface/smbios
71 SRCDIRS += crypto crypto/axtls crypto/matrixssl
72 SRCDIRS += hci hci/commands hci/tui
73 SRCDIRS += hci/mucurses hci/mucurses/widgets
77 # NON_AUTO_SRCS lists files that are excluded from the normal
78 # automatic build system.
81 NON_AUTO_SRCS += drivers/net/prism2.c
83 # INCDIRS lists the include path
88 ###############################################################################
90 # Default build target: build the most common targets and print out a
91 # helpfully suggestive message
93 all : bin/blib.a bin/gpxe.dsk bin/gpxe.iso bin/gpxe.usb bin/undionly.kpxe
94 @$(ECHO) '==========================================================='
96 @$(ECHO) 'To create a bootable floppy, type'
97 @$(ECHO) ' cat bin/gpxe.dsk > /dev/fd0'
98 @$(ECHO) 'where /dev/fd0 is your floppy drive. This will erase any'
99 @$(ECHO) 'data already on the disk.'
101 @$(ECHO) 'To create a bootable USB key, type'
102 @$(ECHO) ' cat bin/gpxe.usb > /dev/sdX'
103 @$(ECHO) 'where /dev/sdX is your USB key, and is *not* a real hard'
104 @$(ECHO) 'disk on your system. This will erase any data already on'
105 @$(ECHO) 'the USB key.'
107 @$(ECHO) 'To create a bootable CD-ROM, burn the ISO image '
108 @$(ECHO) 'bin/gpxe.iso to a blank CD-ROM.'
110 @$(ECHO) 'These images contain drivers for all supported cards. You'
111 @$(ECHO) 'can build more customised images, and ROM images, using'
112 @$(ECHO) ' make bin/<rom-name>.<output-format>'
114 @$(ECHO) '==========================================================='
116 ###############################################################################
118 # Build targets that do nothing but might be tried by users
121 @$(ECHO) "No configuration needed."
124 @$(ECHO) "No installation required."
126 ###############################################################################
128 # Version number calculations
134 MM_VERSION = $(VERSION_MAJOR).$(VERSION_MINOR)
135 VERSION = $(MM_VERSION).$(VERSION_PATCH)$(EXTRAVERSION)
136 CFLAGS += -DVERSION_MAJOR=$(VERSION_MAJOR) \
137 -DVERSION_MINOR=$(VERSION_MINOR) \
138 -DVERSION_PATCH=$(VERSION_PATCH) \
139 -DVERSION=\"$(VERSION)\"
140 IDENT = '$(@F) $(VERSION) (GPL) etherboot.org'
144 ###############################################################################
146 # Drag in the bulk of the build system
149 MAKEDEPS += Makefile.housekeeping
150 include Makefile.housekeeping