2008-10-07 23:18:15 +01:00
|
|
|
###############################################################################
|
2008-01-02 12:50:30 -05:00
|
|
|
#
|
2008-10-07 23:18:15 +01:00
|
|
|
# Initialise various variables
|
2005-04-08 15:01:17 +00:00
|
|
|
#
|
|
|
|
|
|
2008-10-07 23:18:15 +01:00
|
|
|
CLEANUP :=
|
|
|
|
|
CFLAGS :=
|
|
|
|
|
ASFLAGS :=
|
|
|
|
|
LDFLAGS :=
|
2012-04-10 19:38:54 +01:00
|
|
|
HOST_CFLAGS :=
|
2008-10-07 23:18:15 +01:00
|
|
|
MAKEDEPS := Makefile
|
2016-03-13 11:32:54 +00:00
|
|
|
CROSS_COMPILE ?= $(CROSS)
|
2008-10-07 23:18:15 +01:00
|
|
|
|
|
|
|
|
###############################################################################
|
|
|
|
|
#
|
|
|
|
|
# Locations of tools
|
2005-04-08 15:01:17 +00:00
|
|
|
#
|
2008-01-02 12:50:30 -05:00
|
|
|
HOST_CC := gcc
|
|
|
|
|
RM := rm -f
|
|
|
|
|
TOUCH := touch
|
|
|
|
|
MKDIR := mkdir
|
|
|
|
|
CP := cp
|
|
|
|
|
ECHO := echo
|
|
|
|
|
PRINTF := printf
|
2010-06-24 01:23:00 +01:00
|
|
|
PERL := perl
|
2010-07-29 15:17:30 +02:00
|
|
|
TRUE := true
|
2008-01-02 12:50:30 -05:00
|
|
|
CC := $(CROSS_COMPILE)gcc
|
2009-03-10 17:50:01 +00:00
|
|
|
CPP := $(CC) -E
|
2008-01-02 12:50:30 -05: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 22:55:29 +00:00
|
|
|
OPENSSL := openssl
|
2014-03-28 15:45:10 +00:00
|
|
|
CSPLIT := csplit
|
2010-06-24 17:20:35 +01: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 12:50:30 -05:00
|
|
|
NRV2B := ./util/nrv2b
|
|
|
|
|
ZBIN := ./util/zbin
|
2009-01-07 02:05:51 +00:00
|
|
|
ELF2EFI32 := ./util/elf2efi32
|
|
|
|
|
ELF2EFI64 := ./util/elf2efi64
|
2009-01-08 02:19:18 +00:00
|
|
|
EFIROM := ./util/efirom
|
2014-09-10 02:58:50 +01:00
|
|
|
EFIFATBIN := ./util/efifatbin
|
2009-03-10 17:50:01 +00:00
|
|
|
ICCFIX := ./util/iccfix
|
2010-05-30 15:29:05 +01:00
|
|
|
EINFO := ./util/einfo
|
2011-03-16 03:22:45 +00:00
|
|
|
GENKEYMAP := ./util/genkeymap.pl
|
2008-01-02 12:50:30 -05:00
|
|
|
DOXYGEN := doxygen
|
2013-05-14 20:08:26 +01:00
|
|
|
LCAB := lcab
|
2005-04-08 15:01:17 +00:00
|
|
|
|
2008-10-07 23:18:15 +01:00
|
|
|
###############################################################################
|
2005-04-16 23:28:36 +00:00
|
|
|
#
|
2005-04-08 15:01:17 +00:00
|
|
|
# SRCDIRS lists all directories containing source files.
|
|
|
|
|
#
|
2008-10-07 23:18:15 +01:00
|
|
|
SRCDIRS :=
|
2007-07-30 02:37:42 +01:00
|
|
|
SRCDIRS += libgcc
|
2005-04-22 16:36:44 +00: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 14:43:15 +00:00
|
|
|
SRCDIRS += image
|
2005-04-22 16:36:44 +00:00
|
|
|
SRCDIRS += drivers/bus
|
|
|
|
|
SRCDIRS += drivers/net
|
2007-11-18 11:12:54 -05:00
|
|
|
SRCDIRS += drivers/net/e1000
|
2010-03-17 03:18:46 -04:00
|
|
|
SRCDIRS += drivers/net/e1000e
|
2010-03-17 03:44:27 -04:00
|
|
|
SRCDIRS += drivers/net/igb
|
2010-12-15 20:49:32 -07:00
|
|
|
SRCDIRS += drivers/net/igbvf
|
2008-07-04 19:38:14 -07:00
|
|
|
SRCDIRS += drivers/net/phantom
|
2009-06-20 17:58:10 -07:00
|
|
|
SRCDIRS += drivers/net/rtl818x
|
2011-10-14 15:19:32 +01:00
|
|
|
SRCDIRS += drivers/net/ath
|
|
|
|
|
SRCDIRS += drivers/net/ath/ath5k
|
|
|
|
|
SRCDIRS += drivers/net/ath/ath9k
|
2010-02-02 09:42:36 +00:00
|
|
|
SRCDIRS += drivers/net/vxge
|
2010-05-27 20:08:28 -07:00
|
|
|
SRCDIRS += drivers/net/efi
|
2012-01-30 23:10:52 +00:00
|
|
|
SRCDIRS += drivers/net/tg3
|
2006-05-13 11:35:29 +00:00
|
|
|
SRCDIRS += drivers/block
|
2006-05-26 15:39:24 +00:00
|
|
|
SRCDIRS += drivers/nvs
|
2006-06-08 19:47:09 +00:00
|
|
|
SRCDIRS += drivers/bitbash
|
2007-09-18 06:06:55 +01:00
|
|
|
SRCDIRS += drivers/infiniband
|
2016-03-21 15:09:13 +02: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 14:38:42 +00:00
|
|
|
SRCDIRS += drivers/usb
|
2011-02-25 17:46:56 +00:00
|
|
|
SRCDIRS += interface/pxe interface/efi interface/smbios
|
2011-02-10 13:47:38 +00:00
|
|
|
SRCDIRS += interface/bofm
|
2014-07-28 23:38:30 +01:00
|
|
|
SRCDIRS += interface/xen
|
2014-12-11 17:23:45 +00:00
|
|
|
SRCDIRS += interface/hyperv
|
2006-06-01 11:05:36 +00:00
|
|
|
SRCDIRS += tests
|
2015-08-02 16:54:24 +01:00
|
|
|
SRCDIRS += crypto crypto/mishmash
|
2006-12-20 03:04:07 +00:00
|
|
|
SRCDIRS += hci hci/commands hci/tui
|
|
|
|
|
SRCDIRS += hci/mucurses hci/mucurses/widgets
|
2011-03-16 03:22:45 +00:00
|
|
|
SRCDIRS += hci/keymap
|
2006-12-20 07:04:08 +00:00
|
|
|
SRCDIRS += usr
|
2009-08-06 18:52:06 -07:00
|
|
|
SRCDIRS += config
|
2005-04-08 15:01:17 +00:00
|
|
|
|
|
|
|
|
# NON_AUTO_SRCS lists files that are excluded from the normal
|
|
|
|
|
# automatic build system.
|
|
|
|
|
#
|
2008-10-07 23:18:15 +01:00
|
|
|
NON_AUTO_SRCS :=
|
2014-06-19 00:35:04 +01:00
|
|
|
NON_AUTO_SRCS += core/version.c
|
2005-04-16 23:28:36 +00:00
|
|
|
NON_AUTO_SRCS += drivers/net/prism2.c
|
2005-04-08 15:01:17 +00:00
|
|
|
|
2009-08-11 15:14:36 +01:00
|
|
|
# INCDIRS lists the include path
|
|
|
|
|
#
|
|
|
|
|
INCDIRS :=
|
|
|
|
|
INCDIRS += include .
|
|
|
|
|
|
2008-10-07 23:18:15 +01:00
|
|
|
###############################################################################
|
|
|
|
|
#
|
|
|
|
|
# Default build target: build the most common targets and print out a
|
|
|
|
|
# helpfully suggestive message
|
|
|
|
|
#
|
2011-03-26 14:23:21 +00: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-07 23:18:15 +01:00
|
|
|
@$(ECHO) '==========================================================='
|
|
|
|
|
@$(ECHO)
|
|
|
|
|
@$(ECHO) 'To create a bootable floppy, type'
|
2010-04-19 20:16:01 +01:00
|
|
|
@$(ECHO) ' cat bin/ipxe.dsk > /dev/fd0'
|
2008-10-07 23:18:15 +01: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 20:16:01 +01:00
|
|
|
@$(ECHO) ' cat bin/ipxe.usb > /dev/sdX'
|
2008-10-07 23:18:15 +01: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 20:16:01 +01:00
|
|
|
@$(ECHO) 'bin/ipxe.iso to a blank CD-ROM.'
|
2008-10-07 23:18:15 +01: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 16:34:26 +01:00
|
|
|
bin/3c509.rom bin/intel.rom bin/intel.mrom \
|
2016-02-18 02:44:19 +00: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 13:25:42 +01:00
|
|
|
bin-x86_64-efi/ipxe.efirom \
|
2013-01-31 10:12:58 +00: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 13:48:08 -05: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-07 23:18:15 +01:00
|
|
|
###############################################################################
|
2005-04-08 15:01:17 +00:00
|
|
|
#
|
2008-10-07 23:18:15 +01: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 13:25:43 +00:00
|
|
|
|
2008-10-07 23:18:15 +01:00
|
|
|
###############################################################################
|
2005-04-17 13:25:43 +00:00
|
|
|
#
|
2008-10-07 23:18:15 +01:00
|
|
|
# Version number calculations
|
|
|
|
|
#
|
2010-01-26 14:40:57 -05:00
|
|
|
VERSION_MAJOR = 1
|
|
|
|
|
VERSION_MINOR = 0
|
|
|
|
|
VERSION_PATCH = 0
|
2010-02-02 11:26:30 -05:00
|
|
|
EXTRAVERSION = +
|
2008-10-07 23:18:15 +01:00
|
|
|
MM_VERSION = $(VERSION_MAJOR).$(VERSION_MINOR)
|
|
|
|
|
VERSION = $(MM_VERSION).$(VERSION_PATCH)$(EXTRAVERSION)
|
2014-07-28 16:47:48 +01:00
|
|
|
ifneq ($(wildcard ../.git),)
|
2012-07-20 18:06:15 +01:00
|
|
|
GITVERSION := $(shell git describe --always --abbrev=1 --match "" 2>/dev/null)
|
|
|
|
|
VERSION += ($(GITVERSION))
|
|
|
|
|
endif
|
2008-10-07 23:18:15 +01:00
|
|
|
version :
|
2012-07-20 18:06:15 +01:00
|
|
|
@$(ECHO) "$(VERSION)"
|
2005-04-08 15:01:17 +00:00
|
|
|
|
2008-10-07 23:18:15 +01:00
|
|
|
###############################################################################
|
|
|
|
|
#
|
|
|
|
|
# Drag in the bulk of the build system
|
2005-04-08 15:01:17 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
|
|
MAKEDEPS += Makefile.housekeeping
|
|
|
|
|
include Makefile.housekeeping
|