1 ###############################################################################
3 # Initialise various variables
13 ###############################################################################
26 CC
:= $(CROSS_COMPILE
)gcc
28 AS
:= $(CROSS_COMPILE
)as
29 LD
:= $(CROSS_COMPILE
)ld
30 SIZE
:= $(CROSS_COMPILE
)size
31 AR
:= $(CROSS_COMPILE
)ar
32 RANLIB
:= $(CROSS_COMPILE
)ranlib
33 OBJCOPY
:= $(CROSS_COMPILE
)objcopy
34 NM
:= $(CROSS_COMPILE
)nm
35 OBJDUMP
:= $(CROSS_COMPILE
)objdump
38 PARSEROM
:= .
/util
/parserom.pl
39 FIXROM
:= .
/util
/fixrom.pl
40 SYMCHECK
:= .
/util
/symcheck.pl
41 SORTOBJDUMP
:= .
/util
/sortobjdump.pl
42 PADIMG
:= .
/util
/padimg.pl
43 LICENCE
:= .
/util
/licence.pl
46 ELF2EFI32
:= .
/util
/elf2efi32
47 ELF2EFI64
:= .
/util
/elf2efi64
48 EFIROM
:= .
/util
/efirom
49 EFIFATBIN
:= .
/util
/efifatbin
50 ICCFIX
:= .
/util
/iccfix
52 GENKEYMAP
:= .
/util
/genkeymap.pl
56 BFD_DIR
:= $(BINUTILS_DIR
)
59 ###############################################################################
61 # SRCDIRS lists all directories containing source files.
66 SRCDIRS
+= net net
/oncrpc net
/tcp net
/udp net
/infiniband net
/80211
68 SRCDIRS
+= drivers
/bus
69 SRCDIRS
+= drivers
/net
70 SRCDIRS
+= drivers
/net
/e1000
71 SRCDIRS
+= drivers
/net
/e1000e
72 SRCDIRS
+= drivers
/net
/igb
73 SRCDIRS
+= drivers
/net
/igbvf
74 SRCDIRS
+= drivers
/net
/phantom
75 SRCDIRS
+= drivers
/net
/rtl818x
76 SRCDIRS
+= drivers
/net
/ath
77 SRCDIRS
+= drivers
/net
/ath
/ath5k
78 SRCDIRS
+= drivers
/net
/ath
/ath9k
79 SRCDIRS
+= drivers
/net
/vxge
80 SRCDIRS
+= drivers
/net
/efi
81 SRCDIRS
+= drivers
/net
/tg3
82 SRCDIRS
+= drivers
/block
83 SRCDIRS
+= drivers
/nvs
84 SRCDIRS
+= drivers
/bitbash
85 SRCDIRS
+= drivers
/infiniband
86 SRCDIRS
+= drivers
/usb
87 SRCDIRS
+= interface
/pxe interface
/efi interface
/smbios
88 SRCDIRS
+= interface
/bofm
89 SRCDIRS
+= interface
/xen
90 SRCDIRS
+= interface
/hyperv
92 SRCDIRS
+= crypto crypto
/axtls crypto
/matrixssl
93 SRCDIRS
+= hci hci
/commands hci
/tui
94 SRCDIRS
+= hci
/mucurses hci
/mucurses
/widgets
99 # NON_AUTO_SRCS lists files that are excluded from the normal
100 # automatic build system.
103 NON_AUTO_SRCS
+= core
/version.c
104 NON_AUTO_SRCS
+= drivers
/net
/prism2.c
106 # INCDIRS lists the include path
111 ###############################################################################
113 # Default build target: build the most common targets and print out a
114 # helpfully suggestive message
116 ALL
:= bin
/blib.a bin
/ipxe.dsk bin
/ipxe.lkrn bin
/ipxe.iso \
117 bin
/ipxe.usb bin
/ipxe.pxe bin
/undionly.kpxe bin
/rtl8139.rom \
118 bin
/8086100e.mrom bin
/80861209.rom bin
/10500940.rom \
119 bin
/10222000.rom bin
/10ec8139.rom bin
/1af41000.rom \
120 bin
/8086100f.mrom bin
/808610d3.mrom bin
/15ad07b0.rom
123 @
$(ECHO
) '==========================================================='
125 @
$(ECHO
) 'To create a bootable floppy, type'
126 @
$(ECHO
) ' cat bin/ipxe.dsk > /dev/fd0'
127 @
$(ECHO
) 'where /dev/fd0 is your floppy drive. This will erase any'
128 @
$(ECHO
) 'data already on the disk.'
130 @
$(ECHO
) 'To create a bootable USB key, type'
131 @
$(ECHO
) ' cat bin/ipxe.usb > /dev/sdX'
132 @
$(ECHO
) 'where /dev/sdX is your USB key, and is *not* a real hard'
133 @
$(ECHO
) 'disk on your system. This will erase any data already on'
134 @
$(ECHO
) 'the USB key.'
136 @
$(ECHO
) 'To create a bootable CD-ROM, burn the ISO image '
137 @
$(ECHO
) 'bin/ipxe.iso to a blank CD-ROM.'
139 @
$(ECHO
) 'These images contain drivers for all supported cards. You'
140 @
$(ECHO
) 'can build more customised images, and ROM images, using'
141 @
$(ECHO
) ' make bin/<rom-name>.<output-format>'
143 @
$(ECHO
) '==========================================================='
145 ###############################################################################
147 # Comprehensive build target: build a selection of cross-platform
148 # targets to expose potential build errors that show up only on
152 $(Q
)$(MAKE
) --no-print-directory
$(ALL
) \
153 bin
/3c509.rom bin
/intel.rom bin
/intel.mrom \
154 bin-i386-efi
/ipxe.efi bin-i386-efi
/ipxe.efidrv \
155 bin-i386-efi
/ipxe.efirom \
156 bin-x86_64-efi
/ipxe.efi bin-x86_64-efi
/ipxe.efidrv \
157 bin-x86_64-efi
/ipxe.efirom \
158 bin-i386-linux
/tap.linux bin-x86_64-linux
/tap.linux \
159 bin-i386-linux
/tests.linux bin-x86_64-linux
/tests.linux
161 ###############################################################################
163 # VMware build target: all ROMs used with VMware
165 vmware
: bin
/8086100f.mrom bin
/808610d3.mrom bin
/10222000.rom bin
/15ad07b0.rom
166 @
$(ECHO
) '==========================================================='
168 @
$(ECHO
) 'Available ROMs:'
169 @
$(ECHO
) ' bin/8086100f.mrom -- intel/e1000'
170 @
$(ECHO
) ' bin/808610d3.mrom -- intel/e1000e'
171 @
$(ECHO
) ' bin/10222000.rom -- vlance/pcnet32'
172 @
$(ECHO
) ' bin/15ad07b0.rom -- vmxnet3'
174 @
$(ECHO
) 'For more information, see http://ipxe.org/howto/vmware'
176 @
$(ECHO
) '==========================================================='
178 ###############################################################################
180 # Build targets that do nothing but might be tried by users
183 @
$(ECHO
) "No configuration needed."
186 @
$(ECHO
) "No installation required."
188 ###############################################################################
190 # Version number calculations
196 MM_VERSION
= $(VERSION_MAJOR
).
$(VERSION_MINOR
)
197 VERSION
= $(MM_VERSION
).
$(VERSION_PATCH
)$(EXTRAVERSION
)
198 ifneq ($(wildcard ..
/.git
),)
199 GITVERSION
:= $(shell git describe
--always
--abbrev
=1 --match
"" 2>/dev
/null
)
200 VERSION
+= ($(GITVERSION
))
203 @
$(ECHO
) "$(VERSION)"
205 ###############################################################################
207 # Drag in the bulk of the build system
210 MAKEDEPS
+= Makefile.housekeeping
211 include Makefile.housekeeping