]> xenbits.xensource.com Git - xen.git/commitdiff
tools: hvmloader: refactor Makefile to move ROM filenames into variables.
authorIan Campbell <ian.campbell@citrix.com>
Tue, 12 Apr 2011 12:39:56 +0000 (13:39 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Tue, 12 Apr 2011 12:39:56 +0000 (13:39 +0100)
Add an option to use debug Cirrus video BIOS, simply as a convenience.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Keir Fraser <keir@xen.org>
tools/firmware/hvmloader/Makefile

index 59cfed959e7adac835bd5e06187be7b3a588c36a..105fecdc0e25d8fc871ab072d13d1fd562d25395 100644 (file)
@@ -36,6 +36,17 @@ SRCS += tests.c
 endif
 OBJS  = $(patsubst %.c,%.o,$(SRCS))
 
+CIRRUSVGA_DEBUG ?= n
+
+ROMBIOS_ROM   := ../rombios/BIOS-bochs-latest
+
+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
+
 .PHONY: all
 all: subdirs-all
        $(MAKE) hvmloader
@@ -48,12 +59,17 @@ hvmloader: $(OBJS) acpi/acpi.a
        $(OBJCOPY) hvmloader.tmp hvmloader
        rm -f hvmloader.tmp
 
-roms.h: ../rombios/BIOS-bochs-latest ../vgabios/VGABIOS-lgpl-latest.bin \
-       ../vgabios/VGABIOS-lgpl-latest.cirrus.bin ../etherboot/eb-roms.h
-       sh ./mkhex rombios ../rombios/BIOS-bochs-latest > roms.h
-       sh ./mkhex vgabios_stdvga ../vgabios/VGABIOS-lgpl-latest.bin >> roms.h
-       sh ./mkhex vgabios_cirrusvga \
-               ../vgabios/VGABIOS-lgpl-latest.cirrus.bin >> roms.h
+roms.h: $(ROMBIOS_ROM) $(STDVGA_ROM) $(CIRRUSVGA_ROM) ../etherboot/eb-roms.h
+ifneq ($(ROMBIOS_ROM),)
+       sh ./mkhex rombios $(ROMBIOS_ROM) > roms.h
+endif
+ifneq ($(STDVGA_ROM),)
+       sh ./mkhex vgabios_stdvga $(STDVGA_ROM) >> roms.h
+endif
+ifneq ($(CIRRUSVGA_ROM),)
+       sh ./mkhex vgabios_cirrusvga $(CIRRUSVGA_ROM) >> roms.h
+endif
+
        cat ../etherboot/eb-roms.h >> roms.h
 
 .PHONY: clean