-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.qemu
38 lines (31 loc) · 1005 Bytes
/
Makefile.qemu
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
35
36
37
38
VERSION=4.1.0
CONFIGURE_FLAGS=\
--prefix=$(PWD)/qemu-$(VERSION) \
--disable-system \
--disable-tools \
--static \
--enable-debug-info \
--disable-strip
.PHONY: all
all: qemu-$(VERSION)/bin/qemu-x86_64-static
qemu-$(VERSION)/bin/qemu-x86_64-static: qemu-$(VERSION)/config.status
rm -rf qemu-$(VERSION)/bin
cd qemu-$(VERSION) && $(MAKE) && $(MAKE) install
for q in qemu-$(VERSION)/bin/qemu-*; do mv $$q $$q-static; done
qemu-$(VERSION)/config.status: qemu-$(VERSION)/configure
cd qemu-$(VERSION) && ./configure $(CONFIGURE_FLAGS)
qemu-$(VERSION)/configure: qemu-$(VERSION).tar.xz
tar -xJmf qemu-$(VERSION).tar.xz
qemu-$(VERSION).tar.xz:
curl -o qemu-$(VERSION).tar.xz https://download.qemu.org/qemu-$(VERSION).tar.xz
install-%:
update-binfmts --disable qemu-$*
rm /usr/bin/qemu-$*-static
cp qemu-$(VERSION)/bin/qemu-$*-static /usr/bin/
update-binfmts --enable qemu-$*
install: \
install-aarch64 \
install-arm \
install-mips \
install-ppc64le \
install-s390x