[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 3/4] libcacard: fix mingw64 cross-compilation
From: |
Marc-André Lureau |
Subject: |
[Qemu-devel] [PATCH 3/4] libcacard: fix mingw64 cross-compilation |
Date: |
Mon, 25 Feb 2013 18:56:48 +0100 |
From: Marc-André Lureau <address@hidden>
Compile and link with version.lo
Signed-off-by: Marc-André Lureau <address@hidden>
---
Makefile | 8 ++++++--
rules.mak | 2 +-
2 files changed, 7 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 0be8e60..939fb5e 100644
--- a/rules.mak
+++ b/rules.mak
@@ -35,7 +35,7 @@ LIBTOOL += $(if $(V),,--quiet)
LINK = $(call quiet-command,\
$(if $(filter %.lo %.la,$^),$(LIBTOOL) --mode=link --tag=CC \
)$(CC) $(QEMU_CFLAGS) $(CFLAGS) $(LDFLAGS) $(LIBTOOLFLAGS) -o $@ \
- $(sort $(filter %.o, $1)) $(filter-out %.o, $1) $(version-obj-y) \
+ $(sort $(filter %.o, $1)) $(filter-out %.o, $1) $(version-lobj-y) \
$(LIBS),$(if $(filter %.lo %.la,$^),"lt LINK ", " LINK
")"$(TARGET_DIR)$@")
endif
--
1.8.1.1.439.g50a6b54