2008-10-07 22:18:15 +00:00
|
|
|
###############################################################################
|
2008-01-02 17:50:30 +00:00
|
|
|
#
|
2008-10-07 22:18:15 +00:00
|
|
|
# Initialise various variables
|
2005-04-08 15:01:17 +00:00
|
|
|
#
|
|
|
|
|
2008-10-07 22:18:15 +00:00
|
|
|
CLEANUP :=
|
|
|
|
CFLAGS :=
|
|
|
|
ASFLAGS :=
|
|
|
|
LDFLAGS :=
|
|
|
|
MAKEDEPS := Makefile
|
|
|
|
|
|
|
|
###############################################################################
|
|
|
|
#
|
|
|
|
# Locations of tools
|
2005-04-08 15:01:17 +00:00
|
|
|
#
|
2008-01-02 17:50:30 +00:00
|
|
|
HOST_CC := gcc
|
|
|
|
RM := rm -f
|
|
|
|
TOUCH := touch
|
|
|
|
MKDIR := mkdir
|
|
|
|
CP := cp
|
|
|
|
ECHO := echo
|
|
|
|
PRINTF := printf
|
|
|
|
PERL := /usr/bin/perl
|
|
|
|
CC := $(CROSS_COMPILE)gcc
|
2009-03-10 17:50:01 +00:00
|
|
|
CPP := $(CC) -E
|
2008-01-02 17:50:30 +00: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
|
|
|
|
PARSEROM := $(PERL) ./util/parserom.pl
|
|
|
|
MAKEROM := $(PERL) ./util/makerom.pl
|
|
|
|
SYMCHECK := $(PERL) ./util/symcheck.pl
|
|
|
|
SORTOBJDUMP := $(PERL) ./util/sortobjdump.pl
|
2009-04-16 02:15:08 +00:00
|
|
|
PADIMG := $(PERL) ./util/padimg.pl
|
2009-04-29 07:51:27 +00:00
|
|
|
LICENCE := $(PERL) ./util/licence.pl
|
2008-01-02 17:50:30 +00: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
|
2009-03-10 17:50:01 +00:00
|
|
|
ICCFIX := ./util/iccfix
|
2008-01-02 17:50:30 +00:00
|
|
|
DOXYGEN := doxygen
|
2009-03-31 08:36:08 +00:00
|
|
|
BINUTILS_DIR := /usr
|
|
|
|
BFD_DIR := $(BINUTILS_DIR)
|
2005-04-08 15:01:17 +00:00
|
|
|
|
2008-10-07 22:18:15 +00: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 22:18:15 +00:00
|
|
|
SRCDIRS :=
|
2007-07-30 01:37:42 +00:00
|
|
|
SRCDIRS += libgcc
|
2005-04-22 16:36:44 +00:00
|
|
|
SRCDIRS += core
|
2005-04-30 14:45:09 +00:00
|
|
|
SRCDIRS += proto
|
2007-01-10 02:52:58 +00:00
|
|
|
SRCDIRS += net net/tcp net/udp
|
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 16:12:54 +00:00
|
|
|
SRCDIRS += drivers/net/e1000
|
2008-07-05 02:38:14 +00:00
|
|
|
SRCDIRS += drivers/net/phantom
|
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 05:06:55 +00:00
|
|
|
SRCDIRS += drivers/infiniband
|
2008-12-04 23:09:48 +00:00
|
|
|
SRCDIRS += interface/pxe interface/efi interface/smbios
|
2006-06-01 11:05:36 +00:00
|
|
|
SRCDIRS += tests
|
2007-01-26 04:36:50 +00:00
|
|
|
SRCDIRS += crypto crypto/axtls crypto/matrixssl
|
2006-12-20 03:04:07 +00:00
|
|
|
SRCDIRS += hci hci/commands hci/tui
|
|
|
|
SRCDIRS += hci/mucurses hci/mucurses/widgets
|
2006-12-20 07:04:08 +00:00
|
|
|
SRCDIRS += usr
|
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 22:18:15 +00:00
|
|
|
NON_AUTO_SRCS :=
|
2005-04-16 23:28:36 +00:00
|
|
|
NON_AUTO_SRCS += drivers/net/prism2.c
|
2005-04-08 15:01:17 +00:00
|
|
|
|
2008-10-07 22:18:15 +00:00
|
|
|
###############################################################################
|
|
|
|
#
|
|
|
|
# Default build target: build the most common targets and print out a
|
|
|
|
# helpfully suggestive message
|
|
|
|
#
|
|
|
|
all : bin/blib.a bin/gpxe.dsk bin/gpxe.iso bin/gpxe.usb bin/undionly.kpxe
|
|
|
|
@$(ECHO) '==========================================================='
|
|
|
|
@$(ECHO)
|
|
|
|
@$(ECHO) 'To create a bootable floppy, type'
|
|
|
|
@$(ECHO) ' cat bin/gpxe.dsk > /dev/fd0'
|
|
|
|
@$(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'
|
|
|
|
@$(ECHO) ' cat bin/gpxe.usb > /dev/sdX'
|
|
|
|
@$(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 '
|
|
|
|
@$(ECHO) 'bin/gpxe.iso to a blank CD-ROM.'
|
|
|
|
@$(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) '==========================================================='
|
|
|
|
|
|
|
|
###############################################################################
|
2005-04-08 15:01:17 +00:00
|
|
|
#
|
2008-10-07 22:18:15 +00: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 22:18:15 +00:00
|
|
|
###############################################################################
|
2005-04-17 13:25:43 +00:00
|
|
|
#
|
2008-10-07 22:18:15 +00:00
|
|
|
# Version number calculations
|
|
|
|
#
|
|
|
|
VERSION_MAJOR = 0
|
|
|
|
VERSION_MINOR = 9
|
2009-03-02 02:23:42 +00:00
|
|
|
VERSION_PATCH = 7
|
2009-03-02 02:29:20 +00:00
|
|
|
EXTRAVERSION = +
|
2008-10-07 22:18:15 +00:00
|
|
|
MM_VERSION = $(VERSION_MAJOR).$(VERSION_MINOR)
|
|
|
|
VERSION = $(MM_VERSION).$(VERSION_PATCH)$(EXTRAVERSION)
|
|
|
|
CFLAGS += -DVERSION_MAJOR=$(VERSION_MAJOR) \
|
|
|
|
-DVERSION_MINOR=$(VERSION_MINOR) \
|
2009-01-08 08:39:05 +00:00
|
|
|
-DVERSION_PATCH=$(VERSION_PATCH) \
|
2008-10-07 22:18:15 +00:00
|
|
|
-DVERSION=\"$(VERSION)\"
|
|
|
|
IDENT = '$(@F) $(VERSION) (GPL) etherboot.org'
|
|
|
|
version :
|
|
|
|
@$(ECHO) $(VERSION)
|
2005-04-08 15:01:17 +00:00
|
|
|
|
2008-10-07 22:18:15 +00:00
|
|
|
###############################################################################
|
|
|
|
#
|
|
|
|
# Drag in the bulk of the build system
|
2005-04-08 15:01:17 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
MAKEDEPS += Makefile.housekeeping
|
|
|
|
include Makefile.housekeeping
|