8 .PHONY
: kernel user libkvm qemu bios vgabios extboot
clean libfdt
11 ifneq '$(filter $(ARCH), x86_64 i386 ia64)' ''
12 all: $(if
$(WANT_MODULE
), kernel
) user
15 kcmd
= $(if
$(WANT_MODULE
),,@\
#)
17 qemu kernel user libkvm
:
21 ifneq '$(filter $(ARCH), i386 x86_64)' ''
24 ifneq '$(filter $(ARCH), powerpc)' ''
31 cp bios
/BIOS-bochs-latest qemu
/pc-bios
/bios.bin
35 cp vgabios
/VGABIOS-lgpl-latest.bin qemu
/pc-bios
/vgabios.bin
36 cp vgabios
/VGABIOS-lgpl-latest.cirrus.bin qemu
/pc-bios
/vgabios-cirrus.bin
40 if
! [ -f qemu
/pc-bios
/extboot.bin
] \
41 ||
! cmp
-s qemu
/pc-bios
/extboot.bin extboot
/extboot.bin
; then \
42 cp extboot
/extboot.bin qemu
/pc-bios
/extboot.bin
; \
52 utilsdir
= /etc
/kvm
/utils
55 mkdir
-p
$(DESTDIR
)/$(bindir)
56 mkdir
-p
$(DESTDIR
)/$(confdir
)
57 mkdir
-p
$(DESTDIR
)/$(initdir
)
58 mkdir
-p
$(DESTDIR
)/$(utilsdir
)
59 mkdir
-p
$(DESTDIR
)/etc
/udev
/rules.d
60 make
-C qemu DESTDIR
=$(DESTDIR
)/ install
61 ln
-sf
/usr
/kvm
/bin
/qemu-system-x86_64
$(DESTDIR
)/$(bin
)
62 install -m
755 kvm_stat
$(DESTDIR
)/$(bindir)/kvm_stat
63 cp scripts
/kvm
$(DESTDIR
)/$(initdir
)/kvm
64 cp scripts
/qemu-ifup
$(DESTDIR
)/$(confdir
)/qemu-ifup
65 install -t
$(DESTDIR
)/etc
/udev
/rules.d scripts
/*kvm
*.rules
68 $(kcmd
)make
-C kernel DESTDIR
="$(DESTDIR)" install
69 make
-C libkvm DESTDIR
="$(DESTDIR)" install
70 make
-C qemu DESTDIR
="$(DESTDIR)" install
72 tmpspec
= .tmp.kvm.spec
73 RPMTOPDIR
= $$(pwd
)/rpmtop
76 rm -rf
$(RPMTOPDIR
)/BUILD
77 mkdir
-p
$(RPMTOPDIR
)/{BUILD
,RPMS
/$$(uname
-i
)}
79 --define="_topdir $(RPMTOPDIR)" \
80 $(RPMTOPDIR
)/SRPMS
/kvm-0.0
-$(rpmrelease
).src.rpm
83 mkdir
-p
$(RPMTOPDIR
)/{SOURCES
,SRPMS
}
84 sed
's/^Release:.*/Release: $(rpmrelease)/' kvm.spec
> $(tmpspec
)
85 tar czf
$(RPMTOPDIR
)/SOURCES
/kvm.
tar.gz qemu
86 tar czf
$(RPMTOPDIR
)/SOURCES
/user.
tar.gz user
87 tar czf
$(RPMTOPDIR
)/SOURCES
/libkvm.
tar.gz libkvm
88 tar czf
$(RPMTOPDIR
)/SOURCES
/kernel.
tar.gz kernel
89 tar czf
$(RPMTOPDIR
)/SOURCES
/scripts.
tar.gz scripts
90 tar czf
$(RPMTOPDIR
)/SOURCES
/extboot.
tar.gz extboot
91 cp Makefile configure kvm_stat
$(RPMTOPDIR
)/SOURCES
92 rpmbuild
--define="_topdir $(RPMTOPDIR)" -bs
$(tmpspec
)
96 for i in
$(if
$(WANT_MODULE
), kernel
) user libkvm qemu libfdt
; do \
101 rm -f config.mak user
/config.mak