kvm: external module: Make KVM compile on split source/object kernel configurations
KVM as is assumes that the kernel obj dir and the kernel source dir are
at the same location. This is true for most self-built vanilla kernels,
but some distributions split these up (e.g. SUSE).
To keep compatible and have users have a good experience on building KVM
on any distribution, this patch attempts to rebuild the logic from the
kernel Makefile as closely as possible. With it I successfully built KVM
on a current SUSE system.
Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Avi Kivity <avi@redhat.com>