From patchwork Mon Feb 25 22:31:13 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= X-Patchwork-Id: 223061 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 293B72C007A for ; Tue, 26 Feb 2013 09:32:09 +1100 (EST) Received: from localhost ([::1]:40550 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UA6ac-0001vY-3V for incoming@patchwork.ozlabs.org; Mon, 25 Feb 2013 17:32:06 -0500 Received: from eggs.gnu.org ([208.118.235.92]:52891) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UA6aI-0001jk-OF for qemu-devel@nongnu.org; Mon, 25 Feb 2013 17:31:49 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UA6aF-0002p7-Pn for qemu-devel@nongnu.org; Mon, 25 Feb 2013 17:31:46 -0500 Received: from mail-da0-f51.google.com ([209.85.210.51]:45580) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UA6aF-0002oi-KG for qemu-devel@nongnu.org; Mon, 25 Feb 2013 17:31:43 -0500 Received: by mail-da0-f51.google.com with SMTP id n15so1667475dad.24 for ; Mon, 25 Feb 2013 14:31:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references:mime-version:content-type:content-transfer-encoding; bh=mMIy2iiXTHpj7tWFe2VpH+qkN2nBq5tdscACokVY/1k=; b=k1IKme7W3Xp96GRTKzcNC8qPDicQZx5xxqYjvnoxovkontiInYFviGYKbLkBwelPjk 54K7Ne4BLd5CEx4+9c4B+AFs8Aq9WZvTYNyMo/wDvVdErIH2B7RV0HxfnVRCWF3unZwA wIYfymYnCWJItuiglxkrc/VNZd8j2t95LW8axtrkuUAI9P4LYLgaJE8QkXQU9Tg9LISU f4/Hn054fi9RSbeymSjfHvmhm+3Q+uqU7ujmXPcVHsUrjxJAWeBANkgvxJaRcAC1lkcz 3NtRWjSoSDm8hXLf9IFbBo0AvX9cAnOKuI8GlCJecrP/JatvURxrqrtknbNNuQShbHV5 i4/Q== X-Received: by 10.68.222.73 with SMTP id qk9mr20250924pbc.115.1361831502853; Mon, 25 Feb 2013 14:31:42 -0800 (PST) Received: from localhost (142.Red-88-13-163.dynamicIP.rima-tde.net. [88.13.163.142]) by mx.google.com with ESMTPS id dx17sm1217037pac.17.2013.02.25.14.31.38 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 25 Feb 2013 14:31:42 -0800 (PST) From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= To: qemu-devel@nongnu.org Date: Mon, 25 Feb 2013 23:31:13 +0100 Message-Id: <1361831476-5908-3-git-send-email-marcandre.lureau@gmail.com> X-Mailer: git-send-email 1.8.1.1.439.g50a6b54 In-Reply-To: <1361831476-5908-1-git-send-email-marcandre.lureau@gmail.com> References: <1361831476-5908-1-git-send-email-marcandre.lureau@gmail.com> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 209.85.210.51 Cc: pbonzini@redhat.com, alevy@redhat.com, kraxel@redhat.com, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Subject: [Qemu-devel] [PATCH v2 3/6] libcacard: fix mingw64 cross-compilation X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Compile and link with version.lo Signed-off-by: Marc-André Lureau --- Makefile | 8 ++++++-- rules.mak | 3 ++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 2262410..5f0ded1 100644 --- a/Makefile +++ b/Makefile @@ -148,11 +148,15 @@ recurse-all: $(SUBDIR_RULES) $(ROMSUBDIR_RULES) bt-host.o: QEMU_CFLAGS += $(BLUEZ_CFLAGS) -version.o: $(SRC_PATH)/version.rc config-host.h +version.o: $(SRC_PATH)/version.rc config-host.h | version.lo $(call quiet-command,$(WINDRES) -I. -o $@ $<," RC $(TARGET_DIR)$@") +version.lo: $(SRC_PATH)/version.rc config-host.h + $(call quiet-command,$(LIBTOOL) --mode=compile --tag=RC $(WINDRES) -I. -o $@ $<,"lt RC $(TARGET_DIR)$@") version-obj-$(CONFIG_WIN32) += version.o -Makefile: $(version-obj-y) +version-lobj-$(CONFIG_WIN32) += $(if $(LIBTOOL),version.lo) +Makefile: $(version-obj-y) $(version-lobj-y) + ###################################################################### # Build libraries diff --git a/rules.mak b/rules.mak index 36aba2d..292a422 100644 --- a/rules.mak +++ b/rules.mak @@ -35,7 +35,8 @@ LIBTOOL += $(if $(V),,--quiet) LINK = $(call quiet-command,\ $(if $(filter %.lo %.la,$^),$(LIBTOOL) --mode=link --tag=CC \ )$(CC) $(QEMU_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ \ - $(sort $(filter %.o, $1)) $(filter-out %.o, $1) $(version-obj-y) \ + $(sort $(filter %.o, $1)) $(filter-out %.o, $1) \ + $(if $(filter %.lo %.la,$^),$(version-lobj-y),$(version-obj-y)) \ $(if $(filter %.lo %.la,$^),$(LIBTOOLFLAGS)) \ $(LIBS),$(if $(filter %.lo %.la,$^),"lt LINK ", " LINK ")"$(TARGET_DIR)$@") endif