diff mbox

[38/40] xenner: integrate into build system

Message ID 1288715181-28603-1-git-send-email-agraf@suse.de
State New
Headers show

Commit Message

Alexander Graf Nov. 2, 2010, 4:26 p.m. UTC
Now that we have all the pieces in place, let's integrate into the build system.

Signed-off-by: Alexander Graf <agraf@suse.de>
---
 Makefile        |    6 ++++++
 Makefile.target |   16 ++++++++++++++--
 configure       |   21 +++++++++++++++++++--
 3 files changed, 39 insertions(+), 4 deletions(-)
diff mbox

Patch

diff --git a/Makefile b/Makefile
index 3df202c..17b10bf 100644
--- a/Makefile
+++ b/Makefile
@@ -96,6 +96,12 @@  recurse-all: $(SUBDIR_RULES) $(ROMSUBDIR_RULES)
 
 audio/audio.o audio/fmodaudio.o: QEMU_CFLAGS += $(FMOD_CFLAGS)
 
+# xen backend driver support (shared by xen+xenner)
+ifneq ($(CONFIG_XEN)$(CONFIG_XENNER),)
+  obj-y += xen_backend.o xen_devconfig.o
+  obj-y += xen_console.o xenfb.o xen_disk.o xen_nic.o
+endif
+
 QEMU_CFLAGS+=$(CURL_CFLAGS)
 
 ui/cocoa.o: ui/cocoa.m
diff --git a/Makefile.target b/Makefile.target
index c48cbcc..9dc97b6 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -182,8 +182,20 @@  QEMU_CFLAGS += $(VNC_SASL_CFLAGS)
 QEMU_CFLAGS += $(VNC_JPEG_CFLAGS)
 QEMU_CFLAGS += $(VNC_PNG_CFLAGS)
 
-# xen backend driver support
-obj-$(CONFIG_XEN) += xen_machine_pv.o xen_domainbuild.o
+# xen bits shared by xenner+xen
+ifneq ($(CONFIG_XEN)$(CONFIG_XENNER),)
+  obj-y += xen_machine_pv.o xen_interfaces.o
+endif
+
+# xen support
+obj-$(CONFIG_XEN) += xen_domainbuild.o
+
+# xenner support
+obj-$(CONFIG_XENNER) += xenner_core.o xenner_emudev.o xenner_guest_store.o
+obj-$(CONFIG_XENNER) += xenner_pv.o
+obj-$(CONFIG_XENNER) += xenner_libxc_evtchn.o xenner_libxc_gnttab.o xenner_libxc_if.o
+obj-$(CONFIG_XENNER) += xenner_libxenstore.o
+obj-$(CONFIG_XENNER) += xenner_dom_builder.o
 
 # USB layer
 obj-$(CONFIG_USB_OHCI) += usb-ohci.o
diff --git a/configure b/configure
index f62c1fe..4d08220 100755
--- a/configure
+++ b/configure
@@ -285,6 +285,7 @@  vnc_jpeg=""
 vnc_png=""
 vnc_thread="no"
 xen=""
+xenner=""
 linux_aio=""
 attr=""
 vhost_net=""
@@ -632,6 +633,10 @@  for opt do
   ;;
   --enable-xen) xen="yes"
   ;;
+  --disable-xenner) xenner="no"
+  ;;
+  --enable-xenner) xenner="yes"
+  ;;
   --disable-brlapi) brlapi="no"
   ;;
   --enable-brlapi) brlapi="yes"
@@ -868,6 +873,8 @@  echo "                           (affects only QEMU, not qemu-img)"
 echo "  --enable-mixemu          enable mixer emulation"
 echo "  --disable-xen            disable xen backend driver support"
 echo "  --enable-xen             enable xen backend driver support"
+echo "  --disable-xenner         disable xenner (xen emulation) support"
+echo "  --enable-xenner          enable xenner (xen emulation) support"
 echo "  --disable-brlapi         disable BrlAPI"
 echo "  --enable-brlapi          enable BrlAPI"
 echo "  --disable-vnc-tls        disable TLS encryption for VNC server"
@@ -1134,9 +1141,10 @@  else
 fi
 
 ##########################################
-# xen probe
+# probe for xen libs and includes
+# note: xenner included here for now as it needs the headers too.
 
-if test "$xen" != "no" ; then
+if test "$xen" != "no" -o "$xenner" != "no"; then
   xen_libs="-lxenstore -lxenctrl -lxenguest"
   cat > $TMPC <<EOF
 #include <xenctrl.h>
@@ -1145,12 +1153,17 @@  int main(void) { xs_daemon_open(); xc_interface_open(); return 0; }
 EOF
   if compile_prog "" "$xen_libs" ; then
     xen=yes
+    xenner=yes
     libs_softmmu="$xen_libs $libs_softmmu"
   else
     if test "$xen" = "yes" ; then
       feature_not_found "xen"
     fi
+    if test "$xenner" = "yes" ; then
+      feature_not_found "xenner"
+    fi
     xen=no
+    xenner=no
   fi
 fi
 
@@ -2314,6 +2327,7 @@  if test -n "$sparc_cpu"; then
     echo "Target Sparc Arch $sparc_cpu"
 fi
 echo "xen support       $xen"
+echo "xenner support    $xenner"
 echo "brlapi support    $brlapi"
 echo "bluez  support    $bluez"
 echo "Documentation     $docs"
@@ -2886,6 +2900,9 @@  case "$target_arch2" in
     if test "$xen" = "yes" -a "$target_softmmu" = "yes" ; then
       echo "CONFIG_XEN=y" >> $config_target_mak
     fi
+    if test "$xenner" = "yes" -a "$target_softmmu" = "yes" ; then
+      echo "CONFIG_XENNER=y" >> $config_target_mak
+    fi
 esac
 case "$target_arch2" in
   i386|x86_64|ppcemb|ppc|ppc64|s390x)