summarylogtreecommitdiffstats
path: root/Makefile
blob: a7a99b003ab106f013ce50ac06b5cdb82f4fd52e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# Adapted from xen/tools/firmware
# see that file to update
GIT=git
debug=n

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:
	# we get submodules in the PKGBUILD
	#if test -e .git ; then $(GIT) submodule update --init --recursive ; fi
	set -ex; \
	if test -e OvmfPkg/OvmfXen.dsc; then \
	  OvmfPkg/build.sh -a X64 -b $(TARGET) -p OvmfPkg/OvmfXen.dsc; \
	  cp Build/OvmfXen/$(TARGET)_GCC*/FV/OVMF.fd ovmf.bin; \
	else \
	  OvmfPkg/build.sh -a X64 -b $(TARGET) -n 4; \
	  cp Build/OvmfX64/$(TARGET)_GCC*/FV/OVMF.fd ovmf.bin; \
	fi

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