Files
xen/tools/firmware/hvmloader/Makefile
T
Ian Jackson fff4aa914d DEPS handling: Use DEPS_INCLUDE everywhere
DEPS_INCLUDE is currently the same as DEPS, so no functional change.

This patch is the result of this perl rune:

  git-grep -l 'include.*DEPS' | xargs perl -i -pe 'next unless m/^-?include/; s/\bDEPS\b/DEPS_INCLUDE/'

I have verified that I haven't missed anything, with this rune:

  git-grep '\bDEPS\b'

Reported-by: Jan Beulich <JBeulich@suse.com>
CC: Wei Liu <wei.liu2@citrix.com>
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
2017-09-07 16:21:54 +01:00

126 lines
3.4 KiB
Makefile

#
# Makefile
#
# Leendert van Doorn, leendert@watson.ibm.com
# Copyright (c) 2005, International Business Machines Corporation.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU General Public License,
# version 2, as published by the Free Software Foundation.
#
# This program is distributed in the hope it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
#
# You should have received a copy of the GNU General Public License along with
# this program; If not, see <http://www.gnu.org/licenses/>.
#
XEN_ROOT = $(CURDIR)/../../..
include $(XEN_ROOT)/tools/firmware/Rules.mk
LOADADDR = 0x100000
# SMBIOS spec requires format mm/dd/yyyy
SMBIOS_REL_DATE ?= $(shell date +%m/%d/%Y)
CFLAGS += $(CFLAGS_xeninclude)
# We mustn't use tools-only public interfaces.
CFLAGS += -D__XEN_INTERFACE_VERSION__=__XEN_LATEST_INTERFACE_VERSION__
OBJS = hvmloader.o mp_tables.o util.o smbios.o
OBJS += smp.o cacheattr.o xenbus.o vnuma.o
OBJS += e820.o pci.o pir.o ctype.o
OBJS += hvm_param.o
OBJS += ovmf.o seabios.o
ifeq ($(debug),y)
OBJS += tests.o
endif
CIRRUSVGA_DEBUG ?= n
ROMBIOS_DIR := ../rombios
ifeq ($(CONFIG_ROMBIOS),y)
STDVGA_ROM := ../vgabios/VGABIOS-lgpl-latest.bin
ifeq ($(CIRRUSVGA_DEBUG),y)
CIRRUSVGA_ROM := ../vgabios/VGABIOS-lgpl-latest.cirrus.debug.bin
else
CIRRUSVGA_ROM := ../vgabios/VGABIOS-lgpl-latest.cirrus.bin
endif
ETHERBOOT_ROMS := $(addprefix ../etherboot/ipxe/src/bin/, $(addsuffix .rom, $(ETHERBOOT_NICS)))
endif
ROMS :=
ifeq ($(CONFIG_ROMBIOS),y)
OBJS += optionroms.o 32bitbios_support.o rombios.o
CFLAGS += -DENABLE_ROMBIOS
ROMBIOS_ROM := $(ROMBIOS_DIR)/BIOS-bochs-latest
ROMS += $(ROMBIOS_ROM) $(STDVGA_ROM) $(CIRRUSVGA_ROM) $(ETHERBOOT_ROMS)
endif
.PHONY: all
all: acpi subdirs-all
$(MAKE) hvmloader
.PHONY: acpi
acpi:
$(MAKE) -C $(ACPI_PATH) ACPI_BUILD_DIR=$(CURDIR) DSDT_FILES="$(DSDT_FILES)"
rombios.o: roms.inc
smbios.o: CFLAGS += -D__SMBIOS_DATE__="\"$(SMBIOS_REL_DATE)\""
ACPI_PATH = ../../libacpi
DSDT_FILES = dsdt_anycpu.c dsdt_15cpu.c dsdt_anycpu_qemu_xen.c
ACPI_OBJS = $(patsubst %.c,%.o,$(DSDT_FILES)) build.o static_tables.o
$(ACPI_OBJS): CFLAGS += -I. -DLIBACPI_STDUTILS=\"$(CURDIR)/util.h\"
CFLAGS += -I$(ACPI_PATH)
vpath build.c $(ACPI_PATH)
vpath static_tables.c $(ACPI_PATH)
OBJS += $(ACPI_OBJS)
hvmloader: $(OBJS)
$(LD) $(LDFLAGS_DIRECT) -N -Ttext $(LOADADDR) -o $@ $^
roms.inc: $(ROMS)
echo "/* Autogenerated file. DO NOT EDIT */" > $@.new
ifneq ($(ROMBIOS_ROM),)
echo "#ifdef ROM_INCLUDE_ROMBIOS" >> $@.new
sh ./mkhex rombios $(ROMBIOS_ROM) >> $@.new
echo "#endif" >> $@.new
endif
ifneq ($(STDVGA_ROM),)
echo "#ifdef ROM_INCLUDE_VGABIOS" >> $@.new
sh ./mkhex vgabios_stdvga $(STDVGA_ROM) >> $@.new
echo "#endif" >> $@.new
endif
ifneq ($(CIRRUSVGA_ROM),)
echo "#ifdef ROM_INCLUDE_VGABIOS" >> $@.new
sh ./mkhex vgabios_cirrusvga $(CIRRUSVGA_ROM) >> $@.new
echo "#endif" >> $@.new
endif
ifneq ($(ETHERBOOT_ROMS),)
echo "#ifdef ROM_INCLUDE_ETHERBOOT" >> $@.new
sh ./mkhex etherboot $(ETHERBOOT_ROMS) >> $@.new
echo "#endif" >> $@.new
endif
mv $@.new $@
.PHONY: clean
clean: subdirs-clean
rm -f roms.inc roms.inc.new acpi.h
rm -f hvmloader hvmloader.tmp *.o $(DEPS_RM)
$(MAKE) -C $(ACPI_PATH) ACPI_BUILD_DIR=$(CURDIR) clean
.PHONY: distclean
distclean: clean
-include $(DEPS_INCLUDE)