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
:= .
/util
/parserom.pl
35 FIXROM
:= .
/util
/fixrom.pl
36 SYMCHECK
:= .
/util
/symcheck.pl
37 SORTOBJDUMP
:= .
/util
/sortobjdump.pl
38 PADIMG
:= .
/util
/padimg.pl
39 LICENCE
:= .
/util
/licence.pl
42 ELF2EFI32
:= .
/util
/elf2efi32
43 ELF2EFI64
:= .
/util
/elf2efi64
44 EFIROM
:= .
/util
/efirom
45 ICCFIX
:= .
/util
/iccfix
49 BFD_DIR
:= $(BINUTILS_DIR
)
52 ###############################################################################
54 # SRCDIRS lists all directories containing source files.
59 SRCDIRS
+= net net
/tcp net
/udp net
/infiniband net
/80211
61 SRCDIRS
+= drivers
/bus
62 SRCDIRS
+= drivers
/net
63 SRCDIRS
+= drivers
/net
/e1000
64 SRCDIRS
+= drivers
/net
/e1000e
65 SRCDIRS
+= drivers
/net
/igb
66 SRCDIRS
+= drivers
/net
/phantom
67 SRCDIRS
+= drivers
/net
/rtl818x
68 SRCDIRS
+= drivers
/net
/ath5k
69 SRCDIRS
+= drivers
/net
/vxge
70 SRCDIRS
+= drivers
/net
/efi
71 SRCDIRS
+= drivers
/block
72 SRCDIRS
+= drivers
/nvs
73 SRCDIRS
+= drivers
/bitbash
74 SRCDIRS
+= drivers
/infiniband
75 SRCDIRS
+= interface
/pxe interface
/efi interface
/smbios
77 SRCDIRS
+= crypto crypto
/axtls crypto
/matrixssl
78 SRCDIRS
+= hci hci
/commands hci
/tui
79 SRCDIRS
+= hci
/mucurses hci
/mucurses
/widgets
83 # NON_AUTO_SRCS lists files that are excluded from the normal
84 # automatic build system.
87 NON_AUTO_SRCS
+= drivers
/net
/prism2.c
89 # INCDIRS lists the include path
94 ###############################################################################
96 # Default build target: build the most common targets and print out a
97 # helpfully suggestive message
99 all : bin
/blib.a bin
/gpxe.dsk bin
/gpxe.iso bin
/gpxe.usb bin
/undionly.kpxe \
101 @
$(ECHO
) '==========================================================='
103 @
$(ECHO
) 'To create a bootable floppy, type'
104 @
$(ECHO
) ' cat bin/gpxe.dsk > /dev/fd0'
105 @
$(ECHO
) 'where /dev/fd0 is your floppy drive. This will erase any'
106 @
$(ECHO
) 'data already on the disk.'
108 @
$(ECHO
) 'To create a bootable USB key, type'
109 @
$(ECHO
) ' cat bin/gpxe.usb > /dev/sdX'
110 @
$(ECHO
) 'where /dev/sdX is your USB key, and is *not* a real hard'
111 @
$(ECHO
) 'disk on your system. This will erase any data already on'
112 @
$(ECHO
) 'the USB key.'
114 @
$(ECHO
) 'To create a bootable CD-ROM, burn the ISO image '
115 @
$(ECHO
) 'bin/gpxe.iso to a blank CD-ROM.'
117 @
$(ECHO
) 'These images contain drivers for all supported cards. You'
118 @
$(ECHO
) 'can build more customised images, and ROM images, using'
119 @
$(ECHO
) ' make bin/<rom-name>.<output-format>'
121 @
$(ECHO
) '==========================================================='
123 ###############################################################################
125 # Build targets that do nothing but might be tried by users
128 @
$(ECHO
) "No configuration needed."
131 @
$(ECHO
) "No installation required."
133 ###############################################################################
135 # Version number calculations
141 MM_VERSION
= $(VERSION_MAJOR
).
$(VERSION_MINOR
)
142 VERSION
= $(MM_VERSION
).
$(VERSION_PATCH
)$(EXTRAVERSION
)
143 CFLAGS
+= -DVERSION_MAJOR
=$(VERSION_MAJOR
) \
144 -DVERSION_MINOR
=$(VERSION_MINOR
) \
145 -DVERSION_PATCH
=$(VERSION_PATCH
) \
146 -DVERSION
=\"$(VERSION
)\"
147 IDENT
= '$(@F) $(VERSION) (GPL) etherboot.org'
151 ###############################################################################
153 # Drag in the bulk of the build system
156 MAKEDEPS
+= Makefile.housekeeping
157 include Makefile.housekeeping