From patchwork Thu Mar 1 10:05:45 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 10250743 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id DD0AC604D4 for ; Thu, 1 Mar 2018 10:15:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CB58029003 for ; Thu, 1 Mar 2018 10:15:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C93A129032; Thu, 1 Mar 2018 10:15:02 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 3527529003 for ; Thu, 1 Mar 2018 10:14:10 +0000 (UTC) Received: from localhost ([::1]:55201 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1erLE1-0004OA-DG for patchwork-qemu-devel@patchwork.kernel.org; Thu, 01 Mar 2018 05:14:09 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42613) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1erL62-0005FL-HJ for qemu-devel@nongnu.org; Thu, 01 Mar 2018 05:05:56 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1erL5z-00051z-Hh for qemu-devel@nongnu.org; Thu, 01 Mar 2018 05:05:54 -0500 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:42158 helo=mx1.redhat.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1erL5z-00051Z-Cv for qemu-devel@nongnu.org; Thu, 01 Mar 2018 05:05:51 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0C62584222; Thu, 1 Mar 2018 10:05:51 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-147.ams2.redhat.com [10.36.116.147]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9D57D2024CA6; Thu, 1 Mar 2018 10:05:50 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 6D86D1FCC0; Thu, 1 Mar 2018 11:05:48 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Thu, 1 Mar 2018 11:05:45 +0100 Message-Id: <20180301100547.18962-12-kraxel@redhat.com> In-Reply-To: <20180301100547.18962-1-kraxel@redhat.com> References: <20180301100547.18962-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Thu, 01 Mar 2018 10:05:51 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Thu, 01 Mar 2018 10:05:51 +0000 (UTC) for IP:'10.11.54.4' DOMAIN:'int-mx04.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'kraxel@redhat.com' RCPT:'' X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.187.233.73 Subject: [Qemu-devel] [PATCH v2 11/13] ui/curses: build as module X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Guan Xuetao , Markus Armbruster , Gerd Hoffmann Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Also drop curses libs from libs_softmmu. Add CURSES_{CFLAGS,LIBS} variables so we can use them for linking the curses module. Also make target/unicore32/helper.o depend on curses which uses curses directly for some reason ... Signed-off-by: Gerd Hoffmann --- configure | 6 +++--- target/unicore32/Makefile.objs | 4 ++++ ui/Makefile.objs | 6 +++++- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/configure b/configure index 8074fc5001..5ecd538617 100755 --- a/configure +++ b/configure @@ -3269,8 +3269,6 @@ EOF unset IFS if compile_prog "$curses_inc" "$curses_lib" ; then curses_found=yes - QEMU_CFLAGS="$curses_inc $QEMU_CFLAGS" - libs_softmmu="$curses_lib $libs_softmmu" break fi done @@ -6038,7 +6036,9 @@ if test "$cocoa" = "yes" ; then echo "CONFIG_COCOA=y" >> $config_host_mak fi if test "$curses" = "yes" ; then - echo "CONFIG_CURSES=y" >> $config_host_mak + echo "CONFIG_CURSES=m" >> $config_host_mak + echo "CURSES_CFLAGS=$curses_inc" >> $config_host_mak + echo "CURSES_LIBS=$curses_lib" >> $config_host_mak fi if test "$pipe2" = "yes" ; then echo "CONFIG_PIPE2=y" >> $config_host_mak diff --git a/target/unicore32/Makefile.objs b/target/unicore32/Makefile.objs index 6b41b1e9ef..35d8bf530d 100644 --- a/target/unicore32/Makefile.objs +++ b/target/unicore32/Makefile.objs @@ -2,3 +2,7 @@ obj-y += translate.o op_helper.o helper.o cpu.o obj-y += ucf64_helper.o obj-$(CONFIG_SOFTMMU) += softmmu.o + +# Huh? Uses curses directly instead of using ui/console.h interfaces ... +helper.o-cflags := $(CURSES_CFLAGS) +helper.o-libs := $(CURSES_LIBS) diff --git a/ui/Makefile.objs b/ui/Makefile.objs index 49223b0573..a37232762b 100644 --- a/ui/Makefile.objs +++ b/ui/Makefile.objs @@ -13,7 +13,6 @@ common-obj-$(CONFIG_LINUX) += input-linux.o common-obj-$(CONFIG_SPICE) += spice-core.o spice-input.o spice-display.o common-obj-$(CONFIG_SDL) += sdl.mo common-obj-$(CONFIG_COCOA) += cocoa.o -common-obj-$(CONFIG_CURSES) += curses.o common-obj-$(CONFIG_VNC) += $(vnc-obj-y) common-obj-$(call lnot,$(CONFIG_VNC)) += vnc-stubs.o @@ -39,6 +38,11 @@ gtk.mo-objs := gtk.o gtk.mo-cflags := $(GTK_CFLAGS) $(VTE_CFLAGS) gtk.mo-libs := $(GTK_LIBS) $(VTE_LIBS) +common-obj-$(CONFIG_CURSES) += curses.mo +curses.mo-objs := curses.o +curses.mo-cflags := $(CURSES_CFLAGS) +curses.mo-libs := $(CURSES_LIBS) + ifeq ($(CONFIG_OPENGL),y) common-obj-y += shader.o common-obj-y += console-gl.o