From patchwork Tue Dec 18 23:04:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 10736631 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5C87613B5 for ; Tue, 18 Dec 2018 23:52:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4DF612B005 for ; Tue, 18 Dec 2018 23:52:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4235B2B11D; Tue, 18 Dec 2018 23:52:44 +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=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, 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 CD7402B005 for ; Tue, 18 Dec 2018 23:52:43 +0000 (UTC) Received: from localhost ([::1]:56907 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gZPAJ-0004vT-2a for patchwork-qemu-devel@patchwork.kernel.org; Tue, 18 Dec 2018 18:52:43 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41074) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gZORZ-0000iL-G5 for qemu-devel@nongnu.org; Tue, 18 Dec 2018 18:06:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gZORY-0005Hl-6m for qemu-devel@nongnu.org; Tue, 18 Dec 2018 18:06:29 -0500 Received: from hera.aquilenet.fr ([185.233.100.1]:41916) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gZORX-00051Z-JP for qemu-devel@nongnu.org; Tue, 18 Dec 2018 18:06:27 -0500 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id 185A928C7; Wed, 19 Dec 2018 00:05:24 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 3jQfJ7g4wuFP; Wed, 19 Dec 2018 00:05:22 +0100 (CET) Received: from function.home (unknown [IPv6:2a01:cb19:181:c200:9eb6:d0ff:fe88:c3c7]) by hera.aquilenet.fr (Postfix) with ESMTPSA id C44DB2937; Wed, 19 Dec 2018 00:04:47 +0100 (CET) Received: from samy by function.home with local (Exim 4.91) (envelope-from ) id 1gZOPt-0007ME-Gr; Wed, 19 Dec 2018 00:04:45 +0100 From: Samuel Thibault To: qemu-devel@nongnu.org, peter.maydell@linaro.org Date: Wed, 19 Dec 2018 00:04:39 +0100 Message-Id: <20181218230442.27887-62-samuel.thibault@ens-lyon.org> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20181218230442.27887-1-samuel.thibault@ens-lyon.org> References: <20181218230442.27887-1-samuel.thibault@ens-lyon.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 185.233.100.1 Subject: [Qemu-devel] [PULL 61/64] build-sys: use a seperate slirp-obj-y && slirp.mo 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: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Samuel Thibault , stefanha@redhat.com, jan.kiszka@siemens.com Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Marc-André Lureau This will allow to have cflags for the whole slirp.mo -objs. It makes it possible to build tests that links only with slirp-obj-y (and not the whole common-obj). It is also a step towards building slirp as a shared library, although this requires a bit more thoughts to build with net/slirp.o (CONFIG_SLIRP would need to be 'm') and other build issues. Signed-off-by: Marc-André Lureau Signed-off-by: Samuel Thibault --- Makefile.objs | 3 +-- Makefile.target | 5 ++++- slirp/Makefile.objs | 35 ++++++++++++++++++++++++++++++----- 3 files changed, 35 insertions(+), 8 deletions(-) diff --git a/Makefile.objs b/Makefile.objs index 7f777a4908..47b3896ceb 100644 --- a/Makefile.objs +++ b/Makefile.objs @@ -16,6 +16,7 @@ util-obj-y += $(QAPI_MODULES:%=qapi/qapi-events-%.o) util-obj-y += qapi/qapi-introspect.o chardev-obj-y = chardev/ +slirp-obj-$(CONFIG_SLIRP) = slirp/ ####################################################################### # block-obj-y is code used by both qemu system emulation and qemu-img @@ -78,8 +79,6 @@ common-obj-y += vl.o vl.o-cflags := $(GPROF_CFLAGS) $(SDL_CFLAGS) common-obj-$(CONFIG_TPM) += tpm.o -common-obj-$(CONFIG_SLIRP) += slirp/ - common-obj-y += backends/ common-obj-y += chardev/ diff --git a/Makefile.target b/Makefile.target index 44ec4b630c..37e2fc449b 100644 --- a/Makefile.target +++ b/Makefile.target @@ -165,6 +165,7 @@ target-obj-y := block-obj-y := common-obj-y := chardev-obj-y := +slirp-obj-y := include $(SRC_PATH)/Makefile.objs dummy := $(call unnest-vars,,target-obj-y) target-obj-y-save := $(target-obj-y) @@ -177,9 +178,11 @@ dummy := $(call unnest-vars,.., \ qom-obj-y \ io-obj-y \ common-obj-y \ - common-obj-m) + common-obj-m \ + slirp-obj-y) target-obj-y := $(target-obj-y-save) all-obj-y += $(common-obj-y) +all-obj-y += $(slirp-obj-y) all-obj-y += $(target-obj-y) all-obj-y += $(qom-obj-y) all-obj-$(CONFIG_SOFTMMU) += $(block-obj-y) $(chardev-obj-y) diff --git a/slirp/Makefile.objs b/slirp/Makefile.objs index 28049b03cd..21653f69e9 100644 --- a/slirp/Makefile.objs +++ b/slirp/Makefile.objs @@ -1,5 +1,30 @@ -common-obj-y = cksum.o if.o ip_icmp.o ip6_icmp.o ip6_input.o ip6_output.o \ - ip_input.o ip_output.o dnssearch.o dhcpv6.o -common-obj-y += slirp.o mbuf.o misc.o sbuf.o socket.o tcp_input.o tcp_output.o -common-obj-y += tcp_subr.o tcp_timer.o udp.o udp6.o bootp.o tftp.o arp_table.o \ - ndp_table.o ncsi.o +slirp-obj-y = slirp.mo + +slirp.mo-objs = \ + arp_table.o \ + bootp.o \ + cksum.o \ + dhcpv6.o \ + dnssearch.o \ + if.o \ + ip6_icmp.o \ + ip6_input.o \ + ip6_output.o \ + ip_icmp.o \ + ip_input.o \ + ip_output.o \ + mbuf.o \ + misc.o \ + ncsi.o \ + ndp_table.o \ + sbuf.o \ + slirp.o \ + socket.o \ + tcp_input.o \ + tcp_output.o \ + tcp_subr.o \ + tcp_timer.o \ + tftp.o \ + udp.o \ + udp6.o \ + $(NULL)