ia64/xen-unstable

view tools/firmware/hvmloader/Makefile @ 17372:960c33a6bd59

hvmloader: Fix parallel build.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Wed Apr 02 10:28:56 2008 +0100 (2008-04-02)
parents 69c951243105
children fcc4b7c304d9
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 SUBDIRS := acpi
28 # The HVM loader is started in 32-bit mode at the address below:
29 LOADADDR = 0x100000
31 # Disable PIE/SSP if GCC supports them. They can break us.
32 CFLAGS += $(call cc-option,$(CC),-nopie,)
33 CFLAGS += $(call cc-option,$(CC),-fno-stack-protector,)
34 CFLAGS += $(call cc-option,$(CC),-fno-stack-protector-all,)
36 CFLAGS += -fno-builtin -O2 -msoft-float
37 CFLAGS += $(CFLAGS_include) -I.
39 SRCS = hvmloader.c mp_tables.c util.c smbios.c 32bitbios_support.c
40 OBJS = $(patsubst %.c,%.o,$(SRCS))
42 .PHONY: all
43 all: hvmloader
45 hvmloader.o: roms.h
46 smbios.o: CFLAGS += -D__SMBIOS_DATE__="\"$(shell date +%m/%d/%Y)\""
48 hvmloader: subdirs-all $(OBJS)
49 $(LD) $(LDFLAGS_DIRECT) -N -Ttext $(LOADADDR) \
50 -o hvmloader.tmp $(OBJS) acpi/acpi.a
51 $(OBJCOPY) hvmloader.tmp hvmloader
52 rm -f hvmloader.tmp
54 roms.h: ../rombios/BIOS-bochs-latest ../vgabios/VGABIOS-lgpl-latest.bin \
55 ../vgabios/VGABIOS-lgpl-latest.cirrus.bin ../etherboot/eb-roms.h \
56 ../extboot/extboot.bin
57 sh ./mkhex rombios ../rombios/BIOS-bochs-latest > roms.h
58 sh ./mkhex vgabios_stdvga ../vgabios/VGABIOS-lgpl-latest.bin >> roms.h
59 sh ./mkhex vgabios_cirrusvga \
60 ../vgabios/VGABIOS-lgpl-latest.cirrus.bin >> roms.h
61 cat ../etherboot/eb-roms.h >> roms.h
62 sh ./mkhex extboot ../extboot/extboot.bin >> roms.h
64 .PHONY: clean
65 clean: subdirs-clean
66 rm -f roms.h acpi.h
67 rm -f hvmloader hvmloader.tmp *.o