These changes are the raw update to qemu-2.6.
[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         += drivers/usb
87 SRCDIRS         += interface/pxe interface/efi interface/smbios
88 SRCDIRS         += interface/bofm
89 SRCDIRS         += interface/xen
90 SRCDIRS         += interface/hyperv
91 SRCDIRS         += tests
92 SRCDIRS         += crypto crypto/mishmash
93 SRCDIRS         += hci hci/commands hci/tui
94 SRCDIRS         += hci/mucurses hci/mucurses/widgets
95 SRCDIRS         += hci/keymap
96 SRCDIRS         += usr
97 SRCDIRS         += config
98
99 # NON_AUTO_SRCS lists files that are excluded from the normal
100 # automatic build system.
101 #
102 NON_AUTO_SRCS   :=
103 NON_AUTO_SRCS   += core/version.c
104 NON_AUTO_SRCS   += drivers/net/prism2.c
105
106 # INCDIRS lists the include path
107 #
108 INCDIRS         :=
109 INCDIRS         += include .
110
111 ###############################################################################
112 #
113 # Default build target: build the most common targets and print out a
114 # helpfully suggestive message
115 #
116 ALL             := bin/blib.a bin/ipxe.dsk bin/ipxe.lkrn bin/ipxe.iso \
117                    bin/ipxe.usb bin/ipxe.pxe bin/undionly.kpxe bin/rtl8139.rom \
118                    bin/8086100e.mrom bin/80861209.rom bin/10500940.rom \
119                    bin/10222000.rom bin/10ec8139.rom bin/1af41000.rom \
120                    bin/8086100f.mrom bin/808610d3.mrom bin/15ad07b0.rom
121
122 all : $(ALL)
123         @$(ECHO) '==========================================================='
124         @$(ECHO)
125         @$(ECHO) 'To create a bootable floppy, type'
126         @$(ECHO) '    cat bin/ipxe.dsk > /dev/fd0'
127         @$(ECHO) 'where /dev/fd0 is your floppy drive.  This will erase any'
128         @$(ECHO) 'data already on the disk.'
129         @$(ECHO)
130         @$(ECHO) 'To create a bootable USB key, type'
131         @$(ECHO) '    cat bin/ipxe.usb > /dev/sdX'
132         @$(ECHO) 'where /dev/sdX is your USB key, and is *not* a real hard'
133         @$(ECHO) 'disk on your system.  This will erase any data already on'
134         @$(ECHO) 'the USB key.'
135         @$(ECHO)
136         @$(ECHO) 'To create a bootable CD-ROM, burn the ISO image '
137         @$(ECHO) 'bin/ipxe.iso to a blank CD-ROM.'
138         @$(ECHO)
139         @$(ECHO) 'These images contain drivers for all supported cards.  You'
140         @$(ECHO) 'can build more customised images, and ROM images, using'
141         @$(ECHO) '    make bin/<rom-name>.<output-format>'
142         @$(ECHO)
143         @$(ECHO) '==========================================================='
144
145 ###############################################################################
146 #
147 # Comprehensive build target: build a selection of cross-platform
148 # targets to expose potential build errors that show up only on
149 # certain platforms
150 #
151 everything :
152         $(Q)$(MAKE) --no-print-directory $(ALL) \
153                 bin/3c509.rom bin/intel.rom bin/intel.mrom \
154                 bin-i386-efi/ipxe.efi bin-i386-efi/ipxe.efidrv \
155                 bin-i386-efi/ipxe.efirom \
156                 bin-x86_64-efi/ipxe.efi bin-x86_64-efi/ipxe.efidrv \
157                 bin-x86_64-efi/ipxe.efirom \
158                 bin-i386-linux/tap.linux bin-x86_64-linux/tap.linux \
159                 bin-i386-linux/tests.linux bin-x86_64-linux/tests.linux
160
161 ###############################################################################
162 #
163 # VMware build target: all ROMs used with VMware
164 #
165 vmware : bin/8086100f.mrom bin/808610d3.mrom bin/10222000.rom bin/15ad07b0.rom
166         @$(ECHO) '==========================================================='
167         @$(ECHO) 
168         @$(ECHO) 'Available ROMs:'
169         @$(ECHO) '    bin/8086100f.mrom -- intel/e1000'
170         @$(ECHO) '    bin/808610d3.mrom -- intel/e1000e'
171         @$(ECHO) '    bin/10222000.rom  -- vlance/pcnet32'
172         @$(ECHO) '    bin/15ad07b0.rom  -- vmxnet3'
173         @$(ECHO) 
174         @$(ECHO) 'For more information, see http://ipxe.org/howto/vmware'
175         @$(ECHO)
176         @$(ECHO) '==========================================================='
177
178 ###############################################################################
179 #
180 # Build targets that do nothing but might be tried by users
181 #
182 configure :
183         @$(ECHO) "No configuration needed."
184
185 install :
186         @$(ECHO) "No installation required."
187
188 ###############################################################################
189 #
190 # Version number calculations
191 #
192 VERSION_MAJOR   = 1
193 VERSION_MINOR   = 0
194 VERSION_PATCH   = 0
195 EXTRAVERSION    = +
196 MM_VERSION      = $(VERSION_MAJOR).$(VERSION_MINOR)
197 VERSION         = $(MM_VERSION).$(VERSION_PATCH)$(EXTRAVERSION)
198 ifneq ($(wildcard ../.git),)
199 GITVERSION := $(shell git describe --always --abbrev=1 --match "" 2>/dev/null)
200 VERSION         += ($(GITVERSION))
201 endif
202 version :
203         @$(ECHO) "$(VERSION)"
204
205 ###############################################################################
206 #
207 # Drag in the bulk of the build system
208 #
209
210 MAKEDEPS        += Makefile.housekeeping
211 include Makefile.housekeeping