ia64/xen-unstable

view tools/firmware/hvmloader/Makefile @ 16970:a47ac2495137

Fix hvmloader makefile dependencies, and do not recurse into
tools/firmware/etherboot by default (the dependency of eb_roms.h on
Config does not seem to always prevent the build from going ahead, for
some reason).
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Sat Feb 02 13:40:43 2008 +0000 (2008-02-02)
parents 42369d21641d
children 9d0e86d8c1d1
line source
1 #
2 # Makefile
3 #
4 # Leendert van Doorn, leendert@watson.ibm.com
5 # Copyright (c) 2005, International Business Machines Corporation.
6 #
7 # This program is free software; you can redistribute it and/or modify it
8 # under the terms and conditions of the GNU General Public License,
9 # version 2, as published by the Free Software Foundation.
10 #
11 # This program is distributed in the hope it will be useful, but WITHOUT
12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
14 # more details.
15 #
16 # You should have received a copy of the GNU General Public License along with
17 # this program; if not, write to the Free Software Foundation, Inc., 59 Temple
18 # Place - Suite 330, Boston, MA 02111-1307 USA.
19 #
21 override XEN_TARGET_ARCH = x86_32
22 XEN_ROOT = ../../..
23 CFLAGS :=
24 include $(XEN_ROOT)/tools/Rules.mk
26 # The HVM loader is started in 32-bit mode at the address below:
27 LOADADDR = 0x100000
29 # Disable PIE/SSP if GCC supports them. They can break us.
30 CFLAGS += $(call cc-option,$(CC),-nopie,)
31 CFLAGS += $(call cc-option,$(CC),-fno-stack-protector,)
32 CFLAGS += $(call cc-option,$(CC),-fno-stack-protector-all,)
34 CFLAGS += -fno-builtin -O2 -msoft-float
35 CFLAGS += $(CFLAGS_include) -I.
37 SRCS = hvmloader.c mp_tables.c util.c smbios.c 32bitbios_support.c
38 OBJS = $(patsubst %.c,%.o,$(SRCS))
40 .PHONY: all
41 all: hvmloader
43 hvmloader: roms.h acpi/acpi.a $(SRCS)
44 $(CC) $(CFLAGS) -c $(SRCS)
45 $(LD) $(LDFLAGS_DIRECT) -N -Ttext $(LOADADDR) -o hvmloader.tmp $(OBJS) acpi/acpi.a
46 $(OBJCOPY) hvmloader.tmp hvmloader
47 rm -f hvmloader.tmp
49 .PHONY: acpi/acpi.a
50 acpi/acpi.a:
51 $(MAKE) -C acpi
53 roms.h: ../rombios/BIOS-bochs-latest ../vgabios/VGABIOS-lgpl-latest.bin ../vgabios/VGABIOS-lgpl-latest.cirrus.bin ../vmxassist/vmxassist.bin ../etherboot/eb-roms.h ../extboot/extboot.bin
54 sh ./mkhex rombios ../rombios/BIOS-bochs-latest > roms.h
55 sh ./mkhex vgabios_stdvga ../vgabios/VGABIOS-lgpl-latest.bin >> roms.h
56 sh ./mkhex vgabios_cirrusvga ../vgabios/VGABIOS-lgpl-latest.cirrus.bin >> roms.h
57 sh ./mkhex vmxassist ../vmxassist/vmxassist.bin >> roms.h
58 cat ../etherboot/eb-roms.h >> roms.h
59 sh ./mkhex extboot ../extboot/extboot.bin >> roms.h
61 .PHONY: clean
62 clean:
63 rm -f roms.h acpi.h
64 rm -f hvmloader hvmloader.tmp *.o
65 $(MAKE) -C acpi clean