From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:32773) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UHZqh-0003z6-Ge for qemu-devel@nongnu.org; Mon, 18 Mar 2013 09:11:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UHZqZ-0000m7-K8 for qemu-devel@nongnu.org; Mon, 18 Mar 2013 09:11:35 -0400 Received: from mx1.redhat.com ([209.132.183.28]:48588) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UHZqZ-0000lq-AF for qemu-devel@nongnu.org; Mon, 18 Mar 2013 09:11:27 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r2IDBQLV031248 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 18 Mar 2013 09:11:26 -0400 From: Alon Levy Date: Mon, 18 Mar 2013 15:10:54 +0200 Message-Id: <1363612272-13713-9-git-send-email-alevy@redhat.com> In-Reply-To: <1363612272-13713-1-git-send-email-alevy@redhat.com> References: <1363612272-13713-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 08/26] 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 6915178..10abfee 100644 --- a/Makefile +++ b/Makefile @@ -151,11 +151,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.1.4