kqemu: only compile kqemu.o if actually needed
authorblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>
Sat, 18 Apr 2009 19:25:43 +0000 (19:25 +0000)
committerblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>
Sat, 18 Apr 2009 19:25:43 +0000 (19:25 +0000)
kqemu.o is compiled even if kqemu support is disabled. This is useless
(kqemu.o should provide nothing that is actually used in that case) and
slightly confusing. So introduce CONFIG_KQEMU for optionally compiling
kqemu.o.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7185 c046a42c-6fe2-441c-8c8c-71466251a162

Makefile.target
configure

index dae339b..b27696a 100644 (file)
@@ -131,8 +131,11 @@ all: $(PROGS)
 
 #########################################################
 # cpu emulator library
-LIBOBJS=exec.o kqemu.o translate-all.o cpu-exec.o\
+LIBOBJS=exec.o translate-all.o cpu-exec.o\
         translate.o host-utils.o
+ifdef CONFIG_KQEMU
+LIBOBJS+= kqemu.o
+endif
 # TCG code generator
 LIBOBJS+= tcg/tcg.o tcg/tcg-runtime.o
 CPPFLAGS+=-I$(SRC_PATH)/tcg -I$(SRC_PATH)/tcg/$(ARCH)
index d912ae5..c699466 100755 (executable)
--- a/configure
+++ b/configure
@@ -1769,6 +1769,7 @@ case "$target_cpu" in
     echo "#define TARGET_I386 1" >> $config_h
     if test $kqemu = "yes" -a "$target_softmmu" = "yes"
     then
+      echo "CONFIG_KQEMU=yes" >> $config_mak
       echo "#define USE_KQEMU 1" >> $config_h
     fi
     if test "$kvm" = "yes" ; then
@@ -1784,6 +1785,7 @@ case "$target_cpu" in
     echo "#define TARGET_X86_64 1" >> $config_h
     if test $kqemu = "yes" -a "$target_softmmu" = "yes" -a $cpu = "x86_64"
     then
+      echo "CONFIG_KQEMU=yes" >> $config_mak
       echo "#define USE_KQEMU 1" >> $config_h
     fi
     if test "$kvm" = "yes" ; then