1 ###############################################################################
3 # Initialise various variables
12 ###############################################################################
24 CC
:= $(CROSS_COMPILE
)gcc
26 AS
:= $(CROSS_COMPILE
)as
27 LD
:= $(CROSS_COMPILE
)ld
28 SIZE
:= $(CROSS_COMPILE
)size
29 AR
:= $(CROSS_COMPILE
)ar
30 RANLIB
:= $(CROSS_COMPILE
)ranlib
31 OBJCOPY
:= $(CROSS_COMPILE
)objcopy
32 NM
:= $(CROSS_COMPILE
)nm
33 OBJDUMP
:= $(CROSS_COMPILE
)objdump
34 PARSEROM
:= $(PERL
) .
/util
/parserom.pl
35 MAKEROM
:= $(PERL
) .
/util
/makerom.pl
36 SYMCHECK
:= $(PERL
) .
/util
/symcheck.pl
37 SORTOBJDUMP
:= $(PERL
) .
/util
/sortobjdump.pl
38 PADIMG
:= $(PERL
) .
/util
/padimg.pl
39 LICENCE
:= $(PERL
) .
/util
/licence.pl
42 ELF2EFI32
:= .
/util
/elf2efi32
43 ELF2EFI64
:= .
/util
/elf2efi64
44 EFIROM
:= .
/util
/efirom
45 ICCFIX
:= .
/util
/iccfix
48 BFD_DIR
:= $(BINUTILS_DIR
)
51 ###############################################################################
53 # SRCDIRS lists all directories containing source files.
58 SRCDIRS
+= net net
/tcp net
/udp net
/infiniband net
/80211
60 SRCDIRS
+= drivers
/bus
61 SRCDIRS
+= drivers
/net
62 SRCDIRS
+= drivers
/net
/e1000
63 SRCDIRS
+= drivers
/net
/e1000e
64 SRCDIRS
+= drivers
/net
/igb
65 SRCDIRS
+= drivers
/net
/phantom
66 SRCDIRS
+= drivers
/net
/rtl818x
67 SRCDIRS
+= drivers
/net
/ath5k
68 SRCDIRS
+= drivers
/net
/vxge
69 SRCDIRS
+= drivers
/net
/efi
70 SRCDIRS
+= drivers
/block
71 SRCDIRS
+= drivers
/nvs
72 SRCDIRS
+= drivers
/bitbash
73 SRCDIRS
+= drivers
/infiniband
74 SRCDIRS
+= interface
/pxe interface
/efi interface
/smbios
76 SRCDIRS
+= crypto crypto
/axtls crypto
/matrixssl
77 SRCDIRS
+= hci hci
/commands hci
/tui
78 SRCDIRS
+= hci
/mucurses hci
/mucurses
/widgets
82 # NON_AUTO_SRCS lists files that are excluded from the normal
83 # automatic build system.
86 NON_AUTO_SRCS
+= drivers
/net
/prism2.c
88 # INCDIRS lists the include path
93 ###############################################################################
95 # Default build target: build the most common targets and print out a
96 # helpfully suggestive message
98 all : bin
/blib.a bin
/gpxe.dsk bin
/gpxe.iso bin
/gpxe.usb bin
/undionly.kpxe
99 @
$(ECHO
) '==========================================================='
101 @
$(ECHO
) 'To create a bootable floppy, type'
102 @
$(ECHO
) ' cat bin/gpxe.dsk > /dev/fd0'
103 @
$(ECHO
) 'where /dev/fd0 is your floppy drive. This will erase any'
104 @
$(ECHO
) 'data already on the disk.'
106 @
$(ECHO
) 'To create a bootable USB key, type'
107 @
$(ECHO
) ' cat bin/gpxe.usb > /dev/sdX'
108 @
$(ECHO
) 'where /dev/sdX is your USB key, and is *not* a real hard'
109 @
$(ECHO
) 'disk on your system. This will erase any data already on'
110 @
$(ECHO
) 'the USB key.'
112 @
$(ECHO
) 'To create a bootable CD-ROM, burn the ISO image '
113 @
$(ECHO
) 'bin/gpxe.iso to a blank CD-ROM.'
115 @
$(ECHO
) 'These images contain drivers for all supported cards. You'
116 @
$(ECHO
) 'can build more customised images, and ROM images, using'
117 @
$(ECHO
) ' make bin/<rom-name>.<output-format>'
119 @
$(ECHO
) '==========================================================='
121 ###############################################################################
123 # Build targets that do nothing but might be tried by users
126 @
$(ECHO
) "No configuration needed."
129 @
$(ECHO
) "No installation required."
131 ###############################################################################
133 # Version number calculations
139 MM_VERSION
= $(VERSION_MAJOR
).
$(VERSION_MINOR
)
140 VERSION
= $(MM_VERSION
).
$(VERSION_PATCH
)$(EXTRAVERSION
)
141 CFLAGS
+= -DVERSION_MAJOR
=$(VERSION_MAJOR
) \
142 -DVERSION_MINOR
=$(VERSION_MINOR
) \
143 -DVERSION_PATCH
=$(VERSION_PATCH
) \
144 -DVERSION
=\"$(VERSION
)\"
145 IDENT
= '$(@F) $(VERSION) (GPL) etherboot.org'
149 ###############################################################################
151 # Drag in the bulk of the build system
154 MAKEDEPS
+= Makefile.housekeeping
155 include Makefile.housekeeping