source: trunk/packages/xen-3.1/xen-3.1/tools/firmware/hvmloader/Makefile @ 34

Last change on this file since 34 was 34, checked in by hartmans, 18 years ago

Add xen and xen-common

File size: 2.3 KB
Line 
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#
20
21override XEN_TARGET_ARCH = x86_32
22XEN_ROOT = ../../..
23CFLAGS := -I$(XEN_ROOT)/tools/libxc -I.
24include $(XEN_ROOT)/tools/Rules.mk
25
26# The HVM loader is started in 32-bit mode at the address below:
27LOADADDR = 0x100000
28
29# Disable PIE/SSP if GCC supports them. They can break us.
30CFLAGS  += $(call cc-option,$(CC),-nopie,)
31CFLAGS  += $(call cc-option,$(CC),-fno-stack-protector,)
32CFLAGS  += $(call cc-option,$(CC),-fno-stack-protector-all,)
33
34OBJCOPY  = objcopy
35CFLAGS  += -fno-builtin -O2 -msoft-float
36LDFLAGS  = -nostdlib -Wl,-N -Wl,-Ttext -Wl,$(LOADADDR)
37
38SRCS = hvmloader.c mp_tables.c util.c smbios.c 32bitbios_support.c
39OBJS = $(patsubst %.c,%.o,$(SRCS))
40
41.PHONY: all
42all: hvmloader
43
44hvmloader: roms.h acpi/acpi.a $(SRCS)
45        $(CC) $(CFLAGS) -c $(SRCS)
46        $(CC) $(CFLAGS) $(LDFLAGS) -o hvmloader.tmp $(OBJS) acpi/acpi.a
47        $(OBJCOPY) hvmloader.tmp hvmloader
48        rm -f hvmloader.tmp
49
50.PHONY: acpi/acpi.a
51acpi/acpi.a:
52        $(MAKE) -C acpi
53
54roms.h: ../rombios/BIOS-bochs-latest ../vgabios/VGABIOS-lgpl-latest.bin ../vgabios/VGABIOS-lgpl-latest.cirrus.bin ../vmxassist/vmxassist.bin ../etherboot/eb-rtl8139.zrom
55        sh ./mkhex rombios ../rombios/BIOS-bochs-latest > roms.h
56        sh ./mkhex vgabios_stdvga ../vgabios/VGABIOS-lgpl-latest.bin >> roms.h
57        sh ./mkhex vgabios_cirrusvga ../vgabios/VGABIOS-lgpl-latest.cirrus.bin >> roms.h
58        sh ./mkhex vmxassist ../vmxassist/vmxassist.bin >> roms.h
59        sh ./mkhex etherboot ../etherboot/eb-rtl8139.zrom >> roms.h
60
61.PHONY: clean
62clean:
63        rm -f roms.h acpi.h
64        rm -f hvmloader hvmloader.tmp *.o
65        $(MAKE) -C acpi clean
Note: See TracBrowser for help on using the repository browser.