ia64/xen-unstable

view tools/firmware/hvmloader/Makefile @ 9115:46a6d9626911

Ignore external (user-provided) CFLAGS when building vmxassist and hvmloader.
They do more harm than good.

Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Fri Mar 03 10:44:40 2006 +0100 (2006-03-03)
parents e5aba4f62131
children cfee00c6cd88
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 # External CFLAGS can do more harm than good.
22 CFLAGS :=
24 XEN_ROOT = ../../..
25 include $(XEN_ROOT)/Config.mk
27 # The HVM loader is started in 32-bit mode at the address below:
28 LOADADDR = 0x100000
30 DEFINES =-DDEBUG
31 XENINC =-I$(XEN_ROOT)/tools/libxc
33 OBJECTS = hvmloader.o acpi_madt.o
35 # Disable PIE/SSP if GCC supports them. They can break us.
36 CFLAGS += $(call test-gcc-flag,$(CC),-nopie)
37 CFLAGS += $(call test-gcc-flag,$(CC),-fno-stack-protector)
38 CFLAGS += $(call test-gcc-flag,$(CC),-fno-stack-protector-all)
40 OBJCOPY = objcopy
41 CFLAGS += $(DEFINES) -I. $(XENINC) -Wall -fno-builtin -O2 -msoft-float
42 CFLAGS += -m32 -march=i686
43 LDFLAGS = -m32 -nostdlib -Wl,-N -Wl,-Ttext -Wl,$(LOADADDR)
45 all: hvmloader
47 hvmloader: roms.h hvmloader.c acpi_madt.c
48 $(CC) $(CFLAGS) -c hvmloader.c acpi_madt.c
49 $(CC) $(LDFLAGS) -o hvmloader.tmp hvmloader.o acpi_madt.o
50 $(OBJCOPY) hvmloader.tmp hvmloader
51 rm -f hvmloader.tmp
53 roms.h: ../rombios/BIOS-bochs-latest ../vgabios/VGABIOS-lgpl-latest.bin ../vgabios/VGABIOS-lgpl-latest.cirrus.bin ../vmxassist/vmxassist.bin
54 ./mkhex rombios ../rombios/BIOS-bochs-latest > roms.h
55 ./mkhex vgabios_stdvga ../vgabios/VGABIOS-lgpl-latest.bin >> roms.h
56 ./mkhex vgabios_cirrusvga ../vgabios/VGABIOS-lgpl-latest.cirrus.bin >> roms.h
57 ./mkhex vmxassist ../vmxassist/vmxassist.bin >> roms.h
58 ./mkhex acpi ../acpi/acpi.bin >> roms.h
60 clean:
61 rm -f roms.h acpi.h
62 rm -f hvmloader hvmloader.tmp hvmloader.o $(OBJECTS)