XEN_ROOT=$(CURDIR)/../../..
include $(XEN_ROOT)/tools/Rules.mk

ifeq ($(debug),y)
TARGET=DEBUG
else
TARGET=RELEASE
endif

# OVMF build system has its own parallel building support.
.NOTPARALLEL:
MAKEFLAGS  += -j1

.PHONY: all
all: build

.PHONY: build
build:
	OvmfPkg/build.sh -a X64 -b $(TARGET) -n 4
	cp Build/OvmfX64/$(TARGET)_GCC*/FV/OVMF.fd ovmf.bin

.PHONY: clean
clean:
	rm -rf ovmf.bin Build/*
