On 05/18/2011 05:42 AM, Alon Levy wrote:
---
  Makefile           |   20 +++++++++++++++++++-
  Makefile.objs      |    3 +++
  configure          |   12 +++++++++++-
  libcacard/Makefile |   32 ++++++++++++++++++++++++++++----
  rules.mak          |    3 +++
  5 files changed, 64 insertions(+), 6 deletions(-)

diff --git a/Makefile b/Makefile
index 2b0438c..c71026c 100644
--- a/Makefile
+++ b/Makefile
@@ -119,6 +119,23 @@ version.o: $(SRC_PATH)/version.rc config-host.mak

  version-obj-$(CONFIG_WIN32) += version.o
  ######################################################################
+# Support building shared library libcacard
+
+.PHONY: libcacard.la install-libcacard
+ifeq ($(LIBTOOL),)
+libcacard.la:
+       @echo libtool is missing, please install and rerun configure
+
+install-libcacard:
+       @echo libtool is missing, please install and rerun configure
+else
+libcacard.la: $(GENERATED_HEADERS) $(oslib-obj-y) qemu-malloc.o 
qemu-timer-common.o $(addsuffix .lo, $(basename $(trace-obj-y)))
+       $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C libcacard V="$(V)" 
TARGET_DIR="$*/" libcacard.la,)
+
+install-libcacard: libcacard.la
+       $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C libcacard V="$(V)" 
TARGET_DIR="$*/" install-libcacard,)
+endif

If you instead make the .lo rules display the error message (and add "; exit 1" after the echo), you can remove this ifeq. I'll let you decide whether to do this or not.

Otherwise looks good, thanks!

Paolo

Reply via email to