1 KVM_URL
=http
://heanet.dl.sourceforge.net
/sourceforge
/kvm
3 KVM_SOURCE
=kvm-
$(KVM_VERSION
).
tar.gz
4 KVM_DIR
=$(BUILD_DIR
)/kvm
5 KVM_SRC_DIR
=$(KVM_DIR
)/kvm-
$(KVM_VERSION
)
6 KVM_STAMP_DIR
=$(KVM_DIR
)/stamps
8 #KVM_PATCHES=$(PACKAGE_DIR)/kvm/patches/kernel-asm-rsync.patch
10 $(SOURCE_DIR
)/$(KVM_SOURCE
):
11 mkdir
-p
$(SOURCE_DIR
)
12 @ wget
$(WGET_Q
) -P
$(SOURCE_DIR
) $(KVM_URL
)/$(KVM_SOURCE
)
14 $(KVM_STAMP_DIR
)/.unpacked
: $(SOURCE_DIR
)/$(KVM_SOURCE
)
15 tar -C
$(KVM_DIR
) -zxf
$(SOURCE_DIR
)/$(KVM_SOURCE
)
18 $(KVM_STAMP_DIR
)/.patched
: $(KVM_STAMP_DIR
)/.unpacked
19 @ echo
"Patching kvm..."
20 @
$(BIN_DIR
)/doquilt.sh
$(KVM_SRC_DIR
) $(KVM_PATCHES
)
24 $(KVM_STAMP_DIR
)/.configured
: $(KVM_STAMP_DIR
)/.patched
25 @
( export CC
=$(HOST_CC
); unset LIBS
; \
26 cd
$(KVM_SRC_DIR
); .
/configure \
27 --qemu-cflags
=" -Os -s " \
28 --prefix=$(STAGING_DIR
) \
34 $(KVM_SRC_DIR
): $(KVM_STAMP_DIR
)/.configured
35 @
( export CC
=$(HOST_CC
); export CFLAGS
="$(HOST_CFLAGS)"; \
36 export LDFLAGS
="$(HOST_LDFLAGS) -L."; unset LIBS
; \
37 $(MAKE
) -C
$(KVM_SRC_DIR
) libkvm user qemu
)
40 $(INITRD_DIR
)/bin
/kvm
: $(KVM_SRC_DIR
)
41 install -d
$(INITRD_DIR
)/bin
42 install -m
0744 $(KVM_SRC_DIR
)/kvm
$(INITRD_DIR
)/bin
47 kvm
: $(KVM_STAMP_DIR
) $(INITRD_DIR
)/bin
/kvm
50 @
rm -f
$(KVM_STAMP_DIR
)/.configured
51 ifneq ($(wildcard $(KVM_SRC_DIR
)/Makefile
),)
52 $(MAKE
) -C
$(KVM_SRC_DIR
) clean