Add qemu 2.4.0
[kvmfornfv.git] / qemu / roms / ipxe / src / Makefile
1 ###############################################################################
2 #
3 # Initialise various variables
4 #
5
6 CLEANUP         :=
7 CFLAGS          :=
8 ASFLAGS         :=
9 LDFLAGS         :=
10 HOST_CFLAGS     :=
11 MAKEDEPS        := Makefile
12
13 ###############################################################################
14 #
15 # Locations of tools
16 #
17 HOST_CC         := gcc
18 RM              := rm -f
19 TOUCH           := touch
20 MKDIR           := mkdir
21 CP              := cp
22 ECHO            := echo
23 PRINTF          := printf
24 PERL            := perl
25 TRUE            := true
26 CC              := $(CROSS_COMPILE)gcc
27 CPP             := $(CC) -E
28 AS              := $(CROSS_COMPILE)as
29 LD              := $(CROSS_COMPILE)ld
30 SIZE            := $(CROSS_COMPILE)size
31 AR              := $(CROSS_COMPILE)ar
32 RANLIB          := $(CROSS_COMPILE)ranlib
33 OBJCOPY         := $(CROSS_COMPILE)objcopy
34 NM              := $(CROSS_COMPILE)nm
35 OBJDUMP         := $(CROSS_COMPILE)objdump
36 OPENSSL         := openssl
37 CSPLIT          := csplit
38 PARSEROM        := ./util/parserom.pl
39 FIXROM          := ./util/fixrom.pl
40 SYMCHECK        := ./util/symcheck.pl
41 SORTOBJDUMP     := ./util/sortobjdump.pl
42 PADIMG          := ./util/padimg.pl
43 LICENCE         := ./util/licence.pl
44 NRV2B           := ./util/nrv2b
45 ZBIN            := ./util/zbin
46 ELF2EFI32       := ./util/elf2efi32
47 ELF2EFI64       := ./util/elf2efi64
48 EFIROM          := ./util/efirom
49 EFIFATBIN       := ./util/efifatbin
50 ICCFIX          := ./util/iccfix
51 EINFO           := ./util/einfo
52 GENKEYMAP       := ./util/genkeymap.pl
53 DOXYGEN         := doxygen
54 LCAB            := lcab
55 BINUTILS_DIR    := /usr
56 BFD_DIR         := $(BINUTILS_DIR)
57 ZLIB_DIR        := /usr
58
59 ###############################################################################
60 #
61 # SRCDIRS lists all directories containing source files.
62 #
63 SRCDIRS         :=
64 SRCDIRS         += libgcc
65 SRCDIRS         += core
66 SRCDIRS         += net net/oncrpc net/tcp net/udp net/infiniband net/80211
67 SRCDIRS         += image
68 SRCDIRS         += drivers/bus
69 SRCDIRS         += drivers/net
70 SRCDIRS         += drivers/net/e1000
71 SRCDIRS         += drivers/net/e1000e
72 SRCDIRS         += drivers/net/igb
73 SRCDIRS         += drivers/net/igbvf
74 SRCDIRS         += drivers/net/phantom
75 SRCDIRS         += drivers/net/rtl818x
76 SRCDIRS         += drivers/net/ath
77 SRCDIRS         += drivers/net/ath/ath5k
78 SRCDIRS         += drivers/net/ath/ath9k
79 SRCDIRS         += drivers/net/vxge
80 SRCDIRS         += drivers/net/efi
81 SRCDIRS         += drivers/net/tg3
82 SRCDIRS         += drivers/block
83 SRCDIRS         += drivers/nvs
84 SRCDIRS         += drivers/bitbash
85 SRCDIRS         += drivers/infiniband
86 SRCDIRS         += interface/pxe interface/efi interface/smbios
87 SRCDIRS         += interface/bofm
88 SRCDIRS         += interface/xen
89 SRCDIRS         += tests
90 SRCDIRS         += crypto crypto/axtls crypto/matrixssl
91 SRCDIRS         += hci hci/commands hci/tui
92 SRCDIRS         += hci/mucurses hci/mucurses/widgets
93 SRCDIRS         += hci/keymap
94 SRCDIRS         += usr
95 SRCDIRS         += config
96
97 # NON_AUTO_SRCS lists files that are excluded from the normal
98 # automatic build system.
99 #
100 NON_AUTO_SRCS   :=
101 NON_AUTO_SRCS   += core/version.c
102 NON_AUTO_SRCS   += drivers/net/prism2.c
103
104 # INCDIRS lists the include path
105 #
106 INCDIRS         :=
107 INCDIRS         += include .
108
109 ###############################################################################
110 #
111 # Default build target: build the most common targets and print out a
112 # helpfully suggestive message
113 #
114 ALL             := bin/blib.a bin/ipxe.dsk bin/ipxe.lkrn bin/ipxe.iso \
115                    bin/ipxe.usb bin/ipxe.pxe bin/undionly.kpxe bin/rtl8139.rom \
116                    bin/8086100e.mrom bin/80861209.rom bin/10500940.rom \
117                    bin/10222000.rom bin/10ec8139.rom bin/1af41000.rom \
118                    bin/8086100f.mrom bin/808610d3.mrom bin/15ad07b0.rom
119
120 all : $(ALL)
121         @$(ECHO) '==========================================================='
122         @$(ECHO)
123         @$(ECHO) 'To create a bootable floppy, type'
124         @$(ECHO) '    cat bin/ipxe.dsk > /dev/fd0'
125         @$(ECHO) 'where /dev/fd0 is your floppy drive.  This will erase any'
126         @$(ECHO) 'data already on the disk.'
127         @$(ECHO)
128         @$(ECHO) 'To create a bootable USB key, type'
129         @$(ECHO) '    cat bin/ipxe.usb > /dev/sdX'
130         @$(ECHO) 'where /dev/sdX is your USB key, and is *not* a real hard'
131         @$(ECHO) 'disk on your system.  This will erase any data already on'
132         @$(ECHO) 'the USB key.'
133         @$(ECHO)
134         @$(ECHO) 'To create a bootable CD-ROM, burn the ISO image '
135         @$(ECHO) 'bin/ipxe.iso to a blank CD-ROM.'
136         @$(ECHO)
137         @$(ECHO) 'These images contain drivers for all supported cards.  You'
138         @$(ECHO) 'can build more customised images, and ROM images, using'
139         @$(ECHO) '    make bin/<rom-name>.<output-format>'
140         @$(ECHO)
141         @$(ECHO) '==========================================================='
142
143 ###############################################################################
144 #
145 # Comprehensive build target: build a selection of cross-platform
146 # targets to expose potential build errors that show up only on
147 # certain platforms
148 #
149 everything :
150         $(Q)$(MAKE) --no-print-directory $(ALL) \
151                 bin/3c509.rom bin/intel.rom bin/intel.mrom \
152                 bin-i386-efi/ipxe.efi bin-i386-efi/ipxe.efidrv \
153                 bin-i386-efi/ipxe.efirom \
154                 bin-x86_64-efi/ipxe.efi bin-x86_64-efi/ipxe.efidrv \
155                 bin-x86_64-efi/ipxe.efirom \
156                 bin-i386-linux/tap.linux bin-x86_64-linux/tap.linux \
157                 bin-i386-linux/tests.linux bin-x86_64-linux/tests.linux
158
159 ###############################################################################
160 #
161 # VMware build target: all ROMs used with VMware
162 #
163 vmware : bin/8086100f.mrom bin/808610d3.mrom bin/10222000.rom bin/15ad07b0.rom
164         @$(ECHO) '==========================================================='
165         @$(ECHO) 
166         @$(ECHO) 'Available ROMs:'
167         @$(ECHO) '    bin/8086100f.mrom -- intel/e1000'
168         @$(ECHO) '    bin/808610d3.mrom -- intel/e1000e'
169         @$(ECHO) '    bin/10222000.rom  -- vlance/pcnet32'
170         @$(ECHO) '    bin/15ad07b0.rom  -- vmxnet3'
171         @$(ECHO) 
172         @$(ECHO) 'For more information, see http://ipxe.org/howto/vmware'
173         @$(ECHO)
174         @$(ECHO) '==========================================================='
175
176 ###############################################################################
177 #
178 # Build targets that do nothing but might be tried by users
179 #
180 configure :
181         @$(ECHO) "No configuration needed."
182
183 install :
184         @$(ECHO) "No installation required."
185
186 ###############################################################################
187 #
188 # Version number calculations
189 #
190 VERSION_MAJOR   = 1
191 VERSION_MINOR   = 0
192 VERSION_PATCH   = 0
193 EXTRAVERSION    = +
194 MM_VERSION      = $(VERSION_MAJOR).$(VERSION_MINOR)
195 VERSION         = $(MM_VERSION).$(VERSION_PATCH)$(EXTRAVERSION)
196 ifneq ($(wildcard ../.git),)
197 GITVERSION := $(shell git describe --always --abbrev=1 --match "" 2>/dev/null)
198 VERSION         += ($(GITVERSION))
199 endif
200 version :
201         @$(ECHO) "$(VERSION)"
202
203 ###############################################################################
204 #
205 # Drag in the bulk of the build system
206 #
207
208 MAKEDEPS        += Makefile.housekeeping
209 include Makefile.housekeeping