2008-10-08 00:18:15 +02:00
|
|
|
###############################################################################
|
2008-01-02 18:50:30 +01:00
|
|
|
#
|
2008-10-08 00:18:15 +02:00
|
|
|
# Initialise various variables
|
2005-04-08 17:01:17 +02:00
|
|
|
#
|
|
|
|
|
2008-10-08 00:18:15 +02:00
|
|
|
CLEANUP :=
|
|
|
|
CFLAGS :=
|
|
|
|
ASFLAGS :=
|
|
|
|
LDFLAGS :=
|
2012-04-10 20:38:54 +02:00
|
|
|
HOST_CFLAGS :=
|
2008-10-08 00:18:15 +02:00
|
|
|
MAKEDEPS := Makefile
|
2016-03-13 12:32:54 +01:00
|
|
|
CROSS_COMPILE ?= $(CROSS)
|
2008-10-08 00:18:15 +02:00
|
|
|
|
|
|
|
###############################################################################
|
|
|
|
#
|
|
|
|
# Locations of tools
|
2005-04-08 17:01:17 +02:00
|
|
|
#
|
2008-01-02 18:50:30 +01:00
|
|
|
HOST_CC := gcc
|
|
|
|
RM := rm -f
|
|
|
|
TOUCH := touch
|
|
|
|
MKDIR := mkdir
|
|
|
|
CP := cp
|
|
|
|
ECHO := echo
|
|
|
|
PRINTF := printf
|
2010-06-24 02:23:00 +02:00
|
|
|
PERL := perl
|
2010-07-29 15:17:30 +02:00
|
|
|
TRUE := true
|
2008-01-02 18:50:30 +01:00
|
|
|
CC := $(CROSS_COMPILE)gcc
|
2009-03-10 18:50:01 +01:00
|
|
|
CPP := $(CC) -E
|
2008-01-02 18:50:30 +01:00
|
|
|
AS := $(CROSS_COMPILE)as
|
|
|
|
LD := $(CROSS_COMPILE)ld
|
|
|
|
SIZE := $(CROSS_COMPILE)size
|
|
|
|
AR := $(CROSS_COMPILE)ar
|
|
|
|
RANLIB := $(CROSS_COMPILE)ranlib
|
|
|
|
OBJCOPY := $(CROSS_COMPILE)objcopy
|
|
|
|
NM := $(CROSS_COMPILE)nm
|
|
|
|
OBJDUMP := $(CROSS_COMPILE)objdump
|
2012-03-18 23:55:29 +01:00
|
|
|
OPENSSL := openssl
|
2014-03-28 16:45:10 +01:00
|
|
|
CSPLIT := csplit
|
2010-06-24 18:20:35 +02:00
|
|
|
PARSEROM := ./util/parserom.pl
|
|
|
|
FIXROM := ./util/fixrom.pl
|
|
|
|
SYMCHECK := ./util/symcheck.pl
|
|
|
|
SORTOBJDUMP := ./util/sortobjdump.pl
|
|
|
|
PADIMG := ./util/padimg.pl
|
|
|
|
LICENCE := ./util/licence.pl
|
2008-01-02 18:50:30 +01:00
|
|
|
NRV2B := ./util/nrv2b
|
|
|
|
ZBIN := ./util/zbin
|
2009-01-07 03:05:51 +01:00
|
|
|
ELF2EFI32 := ./util/elf2efi32
|
|
|
|
ELF2EFI64 := ./util/elf2efi64
|
2009-01-08 03:19:18 +01:00
|
|
|
EFIROM := ./util/efirom
|
2014-09-10 03:58:50 +02:00
|
|
|
EFIFATBIN := ./util/efifatbin
|
2009-03-10 18:50:01 +01:00
|
|
|
ICCFIX := ./util/iccfix
|
2010-05-30 16:29:05 +02:00
|
|
|
EINFO := ./util/einfo
|
2011-03-16 04:22:45 +01:00
|
|
|
GENKEYMAP := ./util/genkeymap.pl
|
2008-01-02 18:50:30 +01:00
|
|
|
DOXYGEN := doxygen
|
2013-05-14 21:08:26 +02:00
|
|
|
LCAB := lcab
|
2005-04-08 17:01:17 +02:00
|
|
|
|
2008-10-08 00:18:15 +02:00
|
|
|
###############################################################################
|
2005-04-17 01:28:36 +02:00
|
|
|
#
|
2005-04-08 17:01:17 +02:00
|
|
|
# SRCDIRS lists all directories containing source files.
|
|
|
|
#
|
2008-10-08 00:18:15 +02:00
|
|
|
SRCDIRS :=
|
2007-07-30 03:37:42 +02:00
|
|
|
SRCDIRS += libgcc
|
2005-04-22 18:36:44 +02:00
|
|
|
SRCDIRS += core
|
2013-07-15 17:56:29 +02:00
|
|
|
SRCDIRS += net net/oncrpc net/tcp net/udp net/infiniband net/80211
|
2007-01-11 15:43:15 +01:00
|
|
|
SRCDIRS += image
|
2005-04-22 18:36:44 +02:00
|
|
|
SRCDIRS += drivers/bus
|
|
|
|
SRCDIRS += drivers/net
|
2007-11-18 17:12:54 +01:00
|
|
|
SRCDIRS += drivers/net/e1000
|
2010-03-17 08:18:46 +01:00
|
|
|
SRCDIRS += drivers/net/e1000e
|
2010-03-17 08:44:27 +01:00
|
|
|
SRCDIRS += drivers/net/igb
|
2010-12-16 04:49:32 +01:00
|
|
|
SRCDIRS += drivers/net/igbvf
|
2008-07-05 04:38:14 +02:00
|
|
|
SRCDIRS += drivers/net/phantom
|
2009-06-21 02:58:10 +02:00
|
|
|
SRCDIRS += drivers/net/rtl818x
|
2011-10-14 16:19:32 +02:00
|
|
|
SRCDIRS += drivers/net/ath
|
|
|
|
SRCDIRS += drivers/net/ath/ath5k
|
|
|
|
SRCDIRS += drivers/net/ath/ath9k
|
2010-02-02 10:42:36 +01:00
|
|
|
SRCDIRS += drivers/net/vxge
|
2010-05-28 05:08:28 +02:00
|
|
|
SRCDIRS += drivers/net/efi
|
2012-01-31 00:10:52 +01:00
|
|
|
SRCDIRS += drivers/net/tg3
|
2006-05-13 13:35:29 +02:00
|
|
|
SRCDIRS += drivers/block
|
2006-05-26 17:39:24 +02:00
|
|
|
SRCDIRS += drivers/nvs
|
2006-06-08 21:47:09 +02:00
|
|
|
SRCDIRS += drivers/bitbash
|
2007-09-18 07:06:55 +02:00
|
|
|
SRCDIRS += drivers/infiniband
|
2016-03-21 14:09:13 +01:00
|
|
|
SRCDIRS += drivers/infiniband/mlx_utils_flexboot/src
|
|
|
|
SRCDIRS += drivers/infiniband/mlx_utils/src/public
|
|
|
|
SRCDIRS += drivers/infiniband/mlx_utils/mlx_lib/mlx_reg_access
|
|
|
|
SRCDIRS += drivers/infiniband/mlx_utils/mlx_lib/mlx_nvconfig
|
|
|
|
SRCDIRS += drivers/infiniband/mlx_utils/mlx_lib/mlx_vmac
|
|
|
|
SRCDIRS += drivers/infiniband/mlx_utils/mlx_lib/mlx_blink_leds
|
|
|
|
SRCDIRS += drivers/infiniband/mlx_utils/mlx_lib/mlx_link_speed
|
|
|
|
SRCDIRS += drivers/infiniband/mlx_nodnic/src
|
2015-02-02 15:38:42 +01:00
|
|
|
SRCDIRS += drivers/usb
|
2011-02-25 18:46:56 +01:00
|
|
|
SRCDIRS += interface/pxe interface/efi interface/smbios
|
2011-02-10 14:47:38 +01:00
|
|
|
SRCDIRS += interface/bofm
|
2014-07-29 00:38:30 +02:00
|
|
|
SRCDIRS += interface/xen
|
2014-12-11 18:23:45 +01:00
|
|
|
SRCDIRS += interface/hyperv
|
2006-06-01 13:05:36 +02:00
|
|
|
SRCDIRS += tests
|
2015-08-02 17:54:24 +02:00
|
|
|
SRCDIRS += crypto crypto/mishmash
|
2006-12-20 04:04:07 +01:00
|
|
|
SRCDIRS += hci hci/commands hci/tui
|
|
|
|
SRCDIRS += hci/mucurses hci/mucurses/widgets
|
2011-03-16 04:22:45 +01:00
|
|
|
SRCDIRS += hci/keymap
|
2006-12-20 08:04:08 +01:00
|
|
|
SRCDIRS += usr
|
2009-08-07 03:52:06 +02:00
|
|
|
SRCDIRS += config
|
2005-04-08 17:01:17 +02:00
|
|
|
|
|
|
|
# NON_AUTO_SRCS lists files that are excluded from the normal
|
|
|
|
# automatic build system.
|
|
|
|
#
|
2008-10-08 00:18:15 +02:00
|
|
|
NON_AUTO_SRCS :=
|
2014-06-19 01:35:04 +02:00
|
|
|
NON_AUTO_SRCS += core/version.c
|
2005-04-17 01:28:36 +02:00
|
|
|
NON_AUTO_SRCS += drivers/net/prism2.c
|
2005-04-08 17:01:17 +02:00
|
|
|
|
2009-08-11 16:14:36 +02:00
|
|
|
# INCDIRS lists the include path
|
|
|
|
#
|
|
|
|
INCDIRS :=
|
|
|
|
INCDIRS += include .
|
|
|
|
|
2008-10-08 00:18:15 +02:00
|
|
|
###############################################################################
|
|
|
|
#
|
|
|
|
# Default build target: build the most common targets and print out a
|
|
|
|
# helpfully suggestive message
|
|
|
|
#
|
2011-03-26 15:23:21 +01:00
|
|
|
ALL := bin/blib.a bin/ipxe.dsk bin/ipxe.lkrn bin/ipxe.iso \
|
2013-12-26 23:36:34 +01:00
|
|
|
bin/ipxe.usb bin/ipxe.pxe bin/undionly.kpxe bin/rtl8139.rom \
|
|
|
|
bin/8086100e.mrom bin/80861209.rom bin/10500940.rom \
|
|
|
|
bin/10222000.rom bin/10ec8139.rom bin/1af41000.rom \
|
|
|
|
bin/8086100f.mrom bin/808610d3.mrom bin/15ad07b0.rom
|
|
|
|
|
2010-07-29 15:25:36 +02:00
|
|
|
all : $(ALL)
|
2008-10-08 00:18:15 +02:00
|
|
|
@$(ECHO) '==========================================================='
|
|
|
|
@$(ECHO)
|
|
|
|
@$(ECHO) 'To create a bootable floppy, type'
|
2010-04-19 21:16:01 +02:00
|
|
|
@$(ECHO) ' cat bin/ipxe.dsk > /dev/fd0'
|
2008-10-08 00:18:15 +02:00
|
|
|
@$(ECHO) 'where /dev/fd0 is your floppy drive. This will erase any'
|
|
|
|
@$(ECHO) 'data already on the disk.'
|
|
|
|
@$(ECHO)
|
|
|
|
@$(ECHO) 'To create a bootable USB key, type'
|
2010-04-19 21:16:01 +02:00
|
|
|
@$(ECHO) ' cat bin/ipxe.usb > /dev/sdX'
|
2008-10-08 00:18:15 +02:00
|
|
|
@$(ECHO) 'where /dev/sdX is your USB key, and is *not* a real hard'
|
|
|
|
@$(ECHO) 'disk on your system. This will erase any data already on'
|
|
|
|
@$(ECHO) 'the USB key.'
|
|
|
|
@$(ECHO)
|
|
|
|
@$(ECHO) 'To create a bootable CD-ROM, burn the ISO image '
|
2010-04-19 21:16:01 +02:00
|
|
|
@$(ECHO) 'bin/ipxe.iso to a blank CD-ROM.'
|
2008-10-08 00:18:15 +02:00
|
|
|
@$(ECHO)
|
|
|
|
@$(ECHO) 'These images contain drivers for all supported cards. You'
|
|
|
|
@$(ECHO) 'can build more customised images, and ROM images, using'
|
|
|
|
@$(ECHO) ' make bin/<rom-name>.<output-format>'
|
|
|
|
@$(ECHO)
|
|
|
|
@$(ECHO) '==========================================================='
|
|
|
|
|
2010-07-29 15:25:36 +02:00
|
|
|
###############################################################################
|
|
|
|
#
|
|
|
|
# Comprehensive build target: build a selection of cross-platform
|
|
|
|
# targets to expose potential build errors that show up only on
|
|
|
|
# certain platforms
|
|
|
|
#
|
|
|
|
everything :
|
|
|
|
$(Q)$(MAKE) --no-print-directory $(ALL) \
|
2014-08-21 17:34:26 +02:00
|
|
|
bin/3c509.rom bin/intel.rom bin/intel.mrom \
|
2016-02-18 03:44:19 +01:00
|
|
|
bin-x86_64-pcbios/8086100e.mrom bin-x86_64-pcbios/intel.rom \
|
|
|
|
bin-x86_64-pcbios/ipxe.usb bin-x86_64-pcbios/ipxe.pxe \
|
|
|
|
bin-x86_64-pcbios/undionly.kpxe \
|
2010-07-29 15:25:36 +02:00
|
|
|
bin-i386-efi/ipxe.efi bin-i386-efi/ipxe.efidrv \
|
|
|
|
bin-i386-efi/ipxe.efirom \
|
|
|
|
bin-x86_64-efi/ipxe.efi bin-x86_64-efi/ipxe.efidrv \
|
2010-08-19 14:25:42 +02:00
|
|
|
bin-x86_64-efi/ipxe.efirom \
|
2013-01-31 11:12:58 +01:00
|
|
|
bin-i386-linux/tap.linux bin-x86_64-linux/tap.linux \
|
|
|
|
bin-i386-linux/tests.linux bin-x86_64-linux/tests.linux
|
2010-07-29 15:25:36 +02:00
|
|
|
|
2012-11-04 19:48:08 +01:00
|
|
|
###############################################################################
|
|
|
|
#
|
|
|
|
# VMware build target: all ROMs used with VMware
|
|
|
|
#
|
|
|
|
vmware : bin/8086100f.mrom bin/808610d3.mrom bin/10222000.rom bin/15ad07b0.rom
|
|
|
|
@$(ECHO) '==========================================================='
|
|
|
|
@$(ECHO)
|
|
|
|
@$(ECHO) 'Available ROMs:'
|
|
|
|
@$(ECHO) ' bin/8086100f.mrom -- intel/e1000'
|
|
|
|
@$(ECHO) ' bin/808610d3.mrom -- intel/e1000e'
|
|
|
|
@$(ECHO) ' bin/10222000.rom -- vlance/pcnet32'
|
|
|
|
@$(ECHO) ' bin/15ad07b0.rom -- vmxnet3'
|
|
|
|
@$(ECHO)
|
|
|
|
@$(ECHO) 'For more information, see http://ipxe.org/howto/vmware'
|
|
|
|
@$(ECHO)
|
|
|
|
@$(ECHO) '==========================================================='
|
|
|
|
|
2008-10-08 00:18:15 +02:00
|
|
|
###############################################################################
|
2005-04-08 17:01:17 +02:00
|
|
|
#
|
2008-10-08 00:18:15 +02:00
|
|
|
# Build targets that do nothing but might be tried by users
|
|
|
|
#
|
|
|
|
configure :
|
|
|
|
@$(ECHO) "No configuration needed."
|
|
|
|
|
|
|
|
install :
|
|
|
|
@$(ECHO) "No installation required."
|
2005-04-17 15:25:43 +02:00
|
|
|
|
2008-10-08 00:18:15 +02:00
|
|
|
###############################################################################
|
2005-04-17 15:25:43 +02:00
|
|
|
#
|
2008-10-08 00:18:15 +02:00
|
|
|
# Version number calculations
|
|
|
|
#
|
2010-01-26 20:40:57 +01:00
|
|
|
VERSION_MAJOR = 1
|
|
|
|
VERSION_MINOR = 0
|
|
|
|
VERSION_PATCH = 0
|
2010-02-02 17:26:30 +01:00
|
|
|
EXTRAVERSION = +
|
2008-10-08 00:18:15 +02:00
|
|
|
MM_VERSION = $(VERSION_MAJOR).$(VERSION_MINOR)
|
|
|
|
VERSION = $(MM_VERSION).$(VERSION_PATCH)$(EXTRAVERSION)
|
2014-07-28 17:47:48 +02:00
|
|
|
ifneq ($(wildcard ../.git),)
|
2012-07-20 19:06:15 +02:00
|
|
|
GITVERSION := $(shell git describe --always --abbrev=1 --match "" 2>/dev/null)
|
|
|
|
VERSION += ($(GITVERSION))
|
|
|
|
endif
|
2008-10-08 00:18:15 +02:00
|
|
|
version :
|
2012-07-20 19:06:15 +02:00
|
|
|
@$(ECHO) "$(VERSION)"
|
2005-04-08 17:01:17 +02:00
|
|
|
|
2008-10-08 00:18:15 +02:00
|
|
|
###############################################################################
|
|
|
|
#
|
|
|
|
# Drag in the bulk of the build system
|
2005-04-08 17:01:17 +02:00
|
|
|
#
|
|
|
|
|
|
|
|
MAKEDEPS += Makefile.housekeeping
|
|
|
|
include Makefile.housekeeping
|