VirtualBox

source: vbox/trunk/src/VBox/Devices/PC/ipxe/src/Makefile@ 100347

Last change on this file since 100347 was 95666, checked in by vboxsync, 3 years ago

Devices/PC/ipxe: scm fixes and export to OSE, bugref:10254

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 7.7 KB
Line 
1###############################################################################
2#
3# Initialise various variables
4#
5
6CLEANUP :=
7CFLAGS :=
8ASFLAGS :=
9LDFLAGS :=
10HOST_CFLAGS :=
11MAKEDEPS := Makefile
12CROSS_COMPILE ?= $(CROSS)
13
14###############################################################################
15#
16# Locations of tools
17#
18HOST_CC := gcc
19RM := rm -f
20TOUCH := touch
21MKDIR := mkdir
22CP := cp
23ECHO := echo
24PRINTF := printf
25PERL := perl
26TRUE := true
27CC := $(CROSS_COMPILE)gcc
28CPP := $(CC) -E
29AS := $(CROSS_COMPILE)as
30LD := $(CROSS_COMPILE)ld
31SIZE := $(CROSS_COMPILE)size
32AR := $(CROSS_COMPILE)ar
33RANLIB := $(CROSS_COMPILE)ranlib
34OBJCOPY := $(CROSS_COMPILE)objcopy
35NM := $(CROSS_COMPILE)nm
36OBJDUMP := $(CROSS_COMPILE)objdump
37OPENSSL := openssl
38CSPLIT := csplit
39PARSEROM := ./util/parserom.pl
40FIXROM := ./util/fixrom.pl
41SYMCHECK := ./util/symcheck.pl
42SORTOBJDUMP := ./util/sortobjdump.pl
43PADIMG := ./util/padimg.pl
44LICENCE := ./util/licence.pl
45NRV2B := ./util/nrv2b
46ZBIN := ./util/zbin
47ELF2EFI32 := ./util/elf2efi32
48ELF2EFI64 := ./util/elf2efi64
49EFIROM := ./util/efirom
50EFIFATBIN := ./util/efifatbin
51ICCFIX := ./util/iccfix
52EINFO := ./util/einfo
53GENKEYMAP := ./util/genkeymap.pl
54DOXYGEN := doxygen
55LCAB := lcab
56QEMUIMG := qemu-img
57
58###############################################################################
59#
60# SRCDIRS lists all directories containing source files.
61#
62SRCDIRS :=
63SRCDIRS += libgcc
64SRCDIRS += core
65SRCDIRS += net net/tcp net/udp net/infiniband
66SRCDIRS += image
67SRCDIRS += drivers/bus
68SRCDIRS += drivers/net
69SRCDIRS += drivers/net/e1000
70SRCDIRS += drivers/net/e1000e
71SRCDIRS += drivers/net/igb
72SRCDIRS += drivers/net/igbvf
73SRCDIRS += drivers/net/phantom
74SRCDIRS += drivers/net/vxge
75SRCDIRS += drivers/net/efi
76SRCDIRS += drivers/net/tg3
77SRCDIRS += drivers/net/bnxt
78SRCDIRS += drivers/net/sfc
79SRCDIRS += drivers/block
80SRCDIRS += drivers/nvs
81SRCDIRS += drivers/bitbash
82SRCDIRS += drivers/infiniband
83SRCDIRS += drivers/infiniband/mlx_utils_flexboot/src
84SRCDIRS += drivers/infiniband/mlx_utils/src/public
85SRCDIRS += drivers/infiniband/mlx_utils/mlx_lib/mlx_reg_access
86SRCDIRS += drivers/infiniband/mlx_utils/mlx_lib/mlx_nvconfig
87SRCDIRS += drivers/infiniband/mlx_utils/mlx_lib/mlx_vmac
88SRCDIRS += drivers/infiniband/mlx_utils/mlx_lib/mlx_blink_leds
89SRCDIRS += drivers/infiniband/mlx_utils/mlx_lib/mlx_link_speed
90SRCDIRS += drivers/infiniband/mlx_utils/mlx_lib/mlx_mtu
91SRCDIRS += drivers/infiniband/mlx_nodnic/src
92SRCDIRS += drivers/usb
93SRCDIRS += interface/pxe interface/efi interface/smbios
94SRCDIRS += interface/bofm
95SRCDIRS += interface/xen
96SRCDIRS += interface/hyperv
97SRCDIRS += tests
98SRCDIRS += crypto crypto/mishmash
99SRCDIRS += hci hci/commands hci/tui
100SRCDIRS += hci/mucurses hci/mucurses/widgets
101SRCDIRS += hci/keymap
102SRCDIRS += usr
103SRCDIRS += config
104
105# These directories contain code that is not eligible for UEFI Secure
106# Boot signing.
107#
108SRCDIRS_INSEC += net/oncrpc
109SRCDIRS_INSEC += net/80211
110SRCDIRS_INSEC += drivers/net/rtl818x
111SRCDIRS_INSEC += drivers/net/ath
112SRCDIRS_INSEC += drivers/net/ath/ath5k
113SRCDIRS_INSEC += drivers/net/ath/ath9k
114
115# NON_AUTO_SRCS lists files that are excluded from the normal
116# automatic build system.
117#
118NON_AUTO_SRCS :=
119NON_AUTO_SRCS += core/version.c
120NON_AUTO_SRCS += drivers/net/prism2.c
121
122# INCDIRS lists the include path
123#
124INCDIRS :=
125INCDIRS += include .
126
127###############################################################################
128#
129# Default build target: build the most common targets and print out a
130# helpfully suggestive message
131#
132ALL := bin/blib.a bin/ipxe.dsk bin/ipxe.lkrn bin/ipxe.iso \
133 bin/ipxe.usb bin/ipxe.pxe bin/undionly.kpxe bin/rtl8139.rom \
134 bin/8086100e.mrom bin/80861209.rom bin/10500940.rom \
135 bin/10222000.rom bin/10ec8139.rom bin/1af41000.rom \
136 bin/8086100f.mrom bin/808610d3.mrom bin/15ad07b0.rom
137
138all : $(ALL)
139 @$(ECHO) '==========================================================='
140 @$(ECHO)
141 @$(ECHO) 'To create a bootable floppy, type'
142 @$(ECHO) ' cat bin/ipxe.dsk > /dev/fd0'
143 @$(ECHO) 'where /dev/fd0 is your floppy drive. This will erase any'
144 @$(ECHO) 'data already on the disk.'
145 @$(ECHO)
146 @$(ECHO) 'To create a bootable USB key, type'
147 @$(ECHO) ' cat bin/ipxe.usb > /dev/sdX'
148 @$(ECHO) 'where /dev/sdX is your USB key, and is *not* a real hard'
149 @$(ECHO) 'disk on your system. This will erase any data already on'
150 @$(ECHO) 'the USB key.'
151 @$(ECHO)
152 @$(ECHO) 'To create a bootable CD-ROM, burn the ISO image '
153 @$(ECHO) 'bin/ipxe.iso to a blank CD-ROM.'
154 @$(ECHO)
155 @$(ECHO) 'These images contain drivers for all supported cards. You'
156 @$(ECHO) 'can build more customised images, and ROM images, using'
157 @$(ECHO) ' make bin/<rom-name>.<output-format>'
158 @$(ECHO)
159 @$(ECHO) '==========================================================='
160
161###############################################################################
162#
163# Comprehensive build target: build a selection of cross-platform
164# targets to expose potential build errors that show up only on
165# certain platforms
166#
167everything :
168 $(Q)$(MAKE) --no-print-directory $(ALL) \
169 bin/3c509.rom bin/intel.rom bin/intel.mrom \
170 bin-x86_64-pcbios/8086100e.mrom bin-x86_64-pcbios/intel.rom \
171 bin-x86_64-pcbios/ipxe.usb bin-x86_64-pcbios/ipxe.pxe \
172 bin-x86_64-pcbios/undionly.kpxe \
173 bin-i386-efi/ipxe.efi bin-i386-efi/ipxe.efidrv \
174 bin-i386-efi/ipxe.efirom \
175 bin-x86_64-efi/ipxe.efi bin-x86_64-efi/ipxe.efidrv \
176 bin-x86_64-efi/ipxe.efirom \
177 bin-i386-linux/tap.linux bin-x86_64-linux/tap.linux \
178 bin-i386-linux/tests.linux bin-x86_64-linux/tests.linux
179
180###############################################################################
181#
182# VMware build target: all ROMs used with VMware
183#
184vmware : bin/8086100f.mrom bin/808610d3.mrom bin/10222000.rom bin/15ad07b0.rom
185 @$(ECHO) '==========================================================='
186 @$(ECHO)
187 @$(ECHO) 'Available ROMs:'
188 @$(ECHO) ' bin/8086100f.mrom -- intel/e1000'
189 @$(ECHO) ' bin/808610d3.mrom -- intel/e1000e'
190 @$(ECHO) ' bin/10222000.rom -- vlance/pcnet32'
191 @$(ECHO) ' bin/15ad07b0.rom -- vmxnet3'
192 @$(ECHO)
193 @$(ECHO) 'For more information, see http://ipxe.org/howto/vmware'
194 @$(ECHO)
195 @$(ECHO) '==========================================================='
196
197###############################################################################
198#
199# Build targets that do nothing but might be tried by users
200#
201configure :
202 @$(ECHO) "No configuration needed."
203
204install :
205 @$(ECHO) "No installation required."
206
207###############################################################################
208#
209# Version number calculations
210#
211ifneq ($(wildcard ../.git),)
212VERSIONS := $(shell git describe --tags --always --long --abbrev=1 --match "v*")
213VERSION_TUPLE := $(subst ., ,$(subst -, ,$(patsubst v%,%,$(VERSIONS))))
214VERSION_MAJOR := $(word 1,$(VERSION_TUPLE))
215VERSION_MINOR := $(word 2,$(VERSION_TUPLE))
216VERSION_PATCH := $(word 3,$(VERSION_TUPLE))
217ifeq ($(word 4,$(VERSION_TUPLE)),0)
218EXTRAVERSION :=
219else
220EXTRAVERSION := +
221endif
222GITVERSION = $(word 5,$(VERSION_TUPLE))
223else
224VERSION_MAJOR = 1
225VERSION_MINOR = 0
226VERSION_PATCH = 0
227EXTRAVERSION = +
228endif
229MM_VERSION = $(VERSION_MAJOR).$(VERSION_MINOR)
230VERSION = $(MM_VERSION).$(VERSION_PATCH)$(EXTRAVERSION)
231ifneq ($(GITVERSION),)
232VERSION += ($(GITVERSION))
233endif
234version :
235 @$(ECHO) "$(VERSION)"
236
237###############################################################################
238#
239# Predefined build shortcuts (for e.g. bin/ipxe.iso)
240
241# All drivers (excluding USB)
242#
243DRIVERS_ipxe = $(DRIVERS_net) $(DRIVERS_infiniband) \
244 $(DRIVERS_xen) $(DRIVERS_hyperv)
245
246# Raspberry Pi
247#
248DRIVERS_rpi = smsc95xx lan78xx
249
250###############################################################################
251#
252# Drag in the bulk of the build system
253#
254
255MAKEDEPS += Makefile.housekeeping
256include Makefile.housekeeping
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette