From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:53219) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UUIIv-0000Gu-S3 for qemu-devel@nongnu.org; Mon, 22 Apr 2013 11:05:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UUIIu-0001Vt-60 for qemu-devel@nongnu.org; Mon, 22 Apr 2013 11:05:17 -0400 Received: from mx1.redhat.com ([209.132.183.28]:37202) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UUIIt-0001Vj-Ro for qemu-devel@nongnu.org; Mon, 22 Apr 2013 11:05:16 -0400 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r3MF5FZK017082 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 22 Apr 2013 11:05:15 -0400 From: Alon Levy Date: Mon, 22 Apr 2013 18:04:38 +0300 Message-Id: <1366643098-2566-9-git-send-email-alevy@redhat.com> In-Reply-To: <1366643098-2566-1-git-send-email-alevy@redhat.com> References: <1366643098-2566-1-git-send-email-alevy@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH v3 08/28] libcacard: fix mingw64 cross-compilation List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: mlureau@redhat.com From: Marc-Andr=C3=A9 Lureau Compile and link with version.lo Signed-off-by: Marc-Andr=C3=A9 Lureau --- Makefile | 8 ++++++-- rules.mak | 3 ++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 88375dc..b6ad03a 100644 --- a/Makefile +++ b/Makefile @@ -166,11 +166,15 @@ recurse-all: $(SUBDIR_RULES) $(ROMSUBDIR_RULES) =20 bt-host.o: QEMU_CFLAGS +=3D $(BLUEZ_CFLAGS) =20 -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=3Dcompile --tag=3DRC $(WINDRES) = -I. -o $@ $<,"lt RC $(TARGET_DIR)$@") =20 version-obj-$(CONFIG_WIN32) +=3D version.o -Makefile: $(version-obj-y) +version-lobj-$(CONFIG_WIN32) +=3D $(if $(LIBTOOL),version.lo) +Makefile: $(version-obj-y) $(version-lobj-y) + =20 ###################################################################### # 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 +=3D $(if $(V),,--quiet) LINK =3D $(call quiet-command,\ $(if $(filter %.lo %.la,$^),$(LIBTOOL) --mode=3Dlink --tag=3DCC \ )$(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 ")"$(TAR= GET_DIR)$@") endif --=20 1.8.2