[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 61/64] build-sys: use a seperate slirp-obj-y && slirp
From: |
Samuel Thibault |
Subject: |
[Qemu-devel] [PULL 61/64] build-sys: use a seperate slirp-obj-y && slirp.mo |
Date: |
Wed, 19 Dec 2018 00:04:39 +0100 |
From: Marc-André Lureau <address@hidden>
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 <address@hidden>
Signed-off-by: Samuel Thibault <address@hidden>
---
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)
--
2.19.2
- [Qemu-devel] [PULL 54/64] slirp: always build with debug statements, (continued)
- [Qemu-devel] [PULL 54/64] slirp: always build with debug statements, Samuel Thibault, 2018/12/18
- [Qemu-devel] [PULL 49/64] slirp: use virtual time for packet expiration, Samuel Thibault, 2018/12/18
- [Qemu-devel] [PULL 59/64] slirp: factor out guestfwd addition checks, Samuel Thibault, 2018/12/18
- [Qemu-devel] [PULL 47/64] slirp: drop <Vista compatibility, Samuel Thibault, 2018/12/18
- [Qemu-devel] [PULL 53/64] slirp: no need to make DPRINTF conditional on DEBUG, Samuel Thibault, 2018/12/18
- [Qemu-devel] [PULL 58/64] slirp: replace DEBUG_ARGS with DEBUG_ARG, Samuel Thibault, 2018/12/18
- [Qemu-devel] [PULL 52/64] slirp: replace a DEBUG block with WITH_ICMP_ERROR_MSG, Samuel Thibault, 2018/12/18
- [Qemu-devel] [PULL 62/64] slirp: set G_LOG_DOMAIN, Samuel Thibault, 2018/12/18
- [Qemu-devel] [PULL 56/64] slirp: use %p for pointers format, Samuel Thibault, 2018/12/18
- [Qemu-devel] [PULL 57/64] slirp: remove remaining DEBUG blocks, Samuel Thibault, 2018/12/18
- [Qemu-devel] [PULL 61/64] build-sys: use a seperate slirp-obj-y && slirp.mo,
Samuel Thibault <=
- [Qemu-devel] [PULL 64/64] slirp: Mark debugging calls as unlikely, Samuel Thibault, 2018/12/18
- [Qemu-devel] [PULL 55/64] slirp: introduce SLIRP_DEBUG environment variable, Samuel Thibault, 2018/12/18
- [Qemu-devel] [PULL 63/64] slirp: call into g_debug() for DEBUG macros, Samuel Thibault, 2018/12/18
- [Qemu-devel] [PULL 60/64] slirp: add clock_get_ns() callback, Samuel Thibault, 2018/12/18
- [Qemu-devel] [PULL 50/64] slirp: replace a fprintf with g_critical(), Samuel Thibault, 2018/12/18
- Re: [Qemu-devel] [PULL 00/64] slirp updates, Peter Maydell, 2018/12/19
- Re: [Qemu-devel] [PULL 00/64] slirp updates, no-reply, 2018/12/24