1 ###############################################################################
3 # Initialise various variables
12 ###############################################################################
24 CC := $(CROSS_COMPILE)gcc
25 CPP := $(CROSS_COMPILE)gcc -E -Wp,-Wall
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
45 ###############################################################################
47 # SRCDIRS lists all directories containing source files.
53 SRCDIRS += net net/tcp net/udp
55 SRCDIRS += drivers/bus
56 SRCDIRS += drivers/net
57 SRCDIRS += drivers/net/e1000
58 SRCDIRS += drivers/net/phantom
59 SRCDIRS += drivers/block
60 SRCDIRS += drivers/nvs
61 SRCDIRS += drivers/bitbash
62 SRCDIRS += drivers/infiniband
63 SRCDIRS += interface/pxe interface/efi interface/smbios
65 SRCDIRS += crypto crypto/axtls crypto/matrixssl
66 SRCDIRS += hci hci/commands hci/tui
67 SRCDIRS += hci/mucurses hci/mucurses/widgets
70 # NON_AUTO_SRCS lists files that are excluded from the normal
71 # automatic build system.
74 NON_AUTO_SRCS += drivers/net/prism2.c
76 ###############################################################################
78 # Default build target: build the most common targets and print out a
79 # helpfully suggestive message
81 all : bin/blib.a bin/gpxe.dsk bin/gpxe.iso bin/gpxe.usb bin/undionly.kpxe
82 @$(ECHO) '==========================================================='
84 @$(ECHO) 'To create a bootable floppy, type'
85 @$(ECHO) ' cat bin/gpxe.dsk > /dev/fd0'
86 @$(ECHO) 'where /dev/fd0 is your floppy drive. This will erase any'
87 @$(ECHO) 'data already on the disk.'
89 @$(ECHO) 'To create a bootable USB key, type'
90 @$(ECHO) ' cat bin/gpxe.usb > /dev/sdX'
91 @$(ECHO) 'where /dev/sdX is your USB key, and is *not* a real hard'
92 @$(ECHO) 'disk on your system. This will erase any data already on'
93 @$(ECHO) 'the USB key.'
95 @$(ECHO) 'To create a bootable CD-ROM, burn the ISO image '
96 @$(ECHO) 'bin/gpxe.iso to a blank CD-ROM.'
98 @$(ECHO) 'These images contain drivers for all supported cards. You'
99 @$(ECHO) 'can build more customised images, and ROM images, using'
100 @$(ECHO) ' make bin/<rom-name>.<output-format>'
102 @$(ECHO) '==========================================================='
104 ###############################################################################
106 # Build targets that do nothing but might be tried by users
109 @$(ECHO) "No configuration needed."
112 @$(ECHO) "No installation required."
114 ###############################################################################
116 # Version number calculations
122 MM_VERSION = $(VERSION_MAJOR).$(VERSION_MINOR)
123 VERSION = $(MM_VERSION).$(VERSION_PATCH)$(EXTRAVERSION)
124 CFLAGS += -DVERSION_MAJOR=$(VERSION_MAJOR) \
125 -DVERSION_MINOR=$(VERSION_MINOR) \
126 -DVERSION_PATCH=$(VERSION_PATCH) \
127 -DVERSION=\"$(VERSION)\"
128 IDENT = '$(@F) $(VERSION) (GPL) etherboot.org'
132 ###############################################################################
134 # Drag in the bulk of the build system
137 MAKEDEPS += Makefile.housekeeping
138 include Makefile.housekeeping