Skip to contentSkip to conversation

[7185] kqemu: only compile kqemu.o if actually needed

Qemu-devel Blue Swirl 1 participant 1 message Apr 18, 2009 Kbuild

lore
Share & tools
lore

Blue Swirl

author
#0 lore raw

Revision: 7185

          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=7185
Author:   blueswir1
Date:     2009-04-18 19:25:43 +0000 (Sat, 18 Apr 2009)

Log Message:
-----------
kqemu: only compile kqemu.o if actually needed

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.

Modified Paths:
--------------
trunk/Makefile.target
trunk/configure

Modified: trunk/Makefile.target
===================================================================

Makefile.target +4 -1
@@ -131,8 +131,11 @@
 
 #########################################################
 # 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)

Modified: trunk/configure
===================================================================

configure +2 -0
@@ -1769,6 +1769,7 @@
     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 @@
     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