From nobody Sat Nov 8 10:11:50 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (209.51.188.17 [209.51.188.17]) by mx.zohomail.com with SMTPS id 1549990064569468.1302875768662; Tue, 12 Feb 2019 08:47:44 -0800 (PST) Received: from localhost ([127.0.0.1]:42357 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gtbDe-0005pr-HM for importer@patchew.org; Tue, 12 Feb 2019 11:47:38 -0500 Received: from eggs.gnu.org ([209.51.188.92]:35713) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gtb2Z-0005OV-Q9 for qemu-devel@nongnu.org; Tue, 12 Feb 2019 11:36:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gtasU-0000uO-20 for qemu-devel@nongnu.org; Tue, 12 Feb 2019 11:25:48 -0500 Received: from mx1.redhat.com ([209.132.183.28]:57714) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gtasS-0000cC-4u for qemu-devel@nongnu.org; Tue, 12 Feb 2019 11:25:44 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id BD07CC057E16; Tue, 12 Feb 2019 16:25:38 +0000 (UTC) Received: from localhost (unknown [10.36.112.15]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3191E9ED93; Tue, 12 Feb 2019 16:25:38 +0000 (UTC) From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= To: qemu-devel@nongnu.org Date: Tue, 12 Feb 2019 17:25:22 +0100 Message-Id: <20190212162524.31504-6-marcandre.lureau@redhat.com> In-Reply-To: <20190212162524.31504-1-marcandre.lureau@redhat.com> References: <20190212162524.31504-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Tue, 12 Feb 2019 16:25:38 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 5/7] slirp: add a standalone Makefile 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: samuel.thibault@ens-lyon.org, peter.maydell@linaro.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Add a simple Makefile to build libslirp.a, a static library version of libslirp, to be used by QEMU during a transition period, until a shared library is available. Signed-off-by: Marc-Andr=C3=A9 Lureau --- slirp/Makefile | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 slirp/Makefile diff --git a/slirp/Makefile b/slirp/Makefile new file mode 100644 index 0000000000..6d48f626ba --- /dev/null +++ b/slirp/Makefile @@ -0,0 +1,47 @@ +ROOT_DIR :=3D $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST)))) +BUILD_DIR ?=3D . + +LIBSLIRP =3D $(BUILD_DIR)/libslirp.a + +all: $(LIBSLIRP) + +SRCS :=3D $(wildcard src/*.c) +OBJS :=3D $(SRCS:%.c=3D$(BUILD_DIR)/%.o) +DEPS :=3D $(OBJS:%.o=3D%.d) + +INC_DIRS :=3D $(BUILD_DIR)/src +INC_FLAGS :=3D $(addprefix -I,$(INC_DIRS)) + +override CFLAGS +=3D \ + -DG_LOG_DOMAIN=3D'"Slirp"' \ + $(shell $(PKG_CONFIG) --cflags glib-2.0) \ + $(INC_FLAGS) \ + -MMD -MP +override LDFLAGS +=3D $(shell $(PKG_CONFIG) --libs glib-2.0) + +$(LIBSLIRP): $(OBJS) + +.PHONY: clean + +clean: + rm -r $(OBJS) $(DEPS) $(LIBSLIRP) + +$(BUILD_DIR)/src/%.o: $(ROOT_DIR)/src/%.c + @$(MKDIR_P) $(dir $@) + $(call quiet-command,$(CC) $(CFLAGS) -c -o $@ $<,"CC","$@") + +%.a: + $(call quiet-command,rm -f $@ && $(AR) rcs $@ $^,"AR","$@") + +PKG_CONFIG ?=3D pkg-config +MKDIR_P ?=3D mkdir -p +quiet-command-run =3D $(if $(V),,$(if $2,printf " %-7s %s\n" $2 $3 && ))$1 +quiet-@ =3D $(if $(V),,@) +quiet-command =3D $(quiet-@)$(call quiet-command-run,$1,$2,$3) + +print-%: + @echo '$*=3D$($*)' + +.SUFFIXES: + +-include $(DEPS) --=20 2.21.0.rc0.1.g036caf7885