aboutsummaryrefslogtreecommitdiffstats
path: root/tools/firmware/hvmloader/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'tools/firmware/hvmloader/Makefile')
-rw-r--r--tools/firmware/hvmloader/Makefile32
1 files changed, 19 insertions, 13 deletions
diff --git a/tools/firmware/hvmloader/Makefile b/tools/firmware/hvmloader/Makefile
index 5a5ee41e79..175dba6360 100644
--- a/tools/firmware/hvmloader/Makefile
+++ b/tools/firmware/hvmloader/Makefile
@@ -38,27 +38,33 @@ endif
CIRRUSVGA_DEBUG ?= n
ROMBIOS_DIR := ../rombios
-ifneq ($(ROMBIOS_DIR),)
-OBJS += optionroms.o 32bitbios_support.o rombios.o
-CFLAGS += -DENABLE_ROMBIOS
-ROMBIOS_ROM := $(ROMBIOS_DIR)/BIOS-bochs-latest
-endif
-
SEABIOS_DIR := ../seabios-dir
-ifneq ($(SEABIOS_DIR),)
-OBJS += seabios.o
-CFLAGS += -DENABLE_SEABIOS
-SEABIOS_ROM := $(SEABIOS_DIR)/out/bios.bin
-endif
+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
+
+ifeq ($(CONFIG_SEABIOS),y)
+OBJS += seabios.o
+CFLAGS += -DENABLE_SEABIOS
+SEABIOS_ROM := $(SEABIOS_DIR)/out/bios.bin
+ROMS += $(SEABIOS_ROM)
+endif
.PHONY: all
all: subdirs-all
@@ -72,7 +78,7 @@ hvmloader: $(OBJS) acpi/acpi.a
$(OBJCOPY) hvmloader.tmp hvmloader
rm -f hvmloader.tmp
-roms.inc: $(ROMBIOS_ROM) $(SEABIOS_ROM) $(STDVGA_ROM) $(CIRRUSVGA_ROM) $(ETHERBOOT_ROMS)
+roms.inc: $(ROMS)
echo "/* Autogenerated file. DO NOT EDIT */" > $@.new
ifneq ($(ROMBIOS_ROM),)