Received: from eggs.gnu.org ([208.118.235.92]:50762) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tu50L-0001gW-QF for qemu-devel@nongnu.org; Sat, 12 Jan 2013 12:36:33 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tu50K-0000N3-7F for qemu-devel@nongnu.org; Sat, 12 Jan 2013 12:36:25 -0500 Received: from mail-wi0-f173.google.com ([209.85.212.173]:49231) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tu50K-0000Mv-1d for qemu-devel@nongnu.org; Sat, 12 Jan 2013 12:36:24 -0500 Received: by mail-wi0-f173.google.com with SMTP id hn17so461848wib.0 for ; Sat, 12 Jan 2013 09:36:23 -0800 (PST) Sender: Paolo Bonzini From: Paolo Bonzini Date: Sat, 12 Jan 2013 18:35:15 +0100 Message-Id: <1358012138-21613-5-git-send-email-pbonzini@redhat.com> In-Reply-To: <1358012138-21613-1-git-send-email-pbonzini@redhat.com> References: <1358012138-21613-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PATCH 04/27] build: support linking with libtool objects/libraries List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org This patch moves the complication of using libtool to the generic rules.mak file. Signed-off-by: Paolo Bonzini --- configure | 8 +++++++- libcacard/Makefile | 11 +++++++---- rules.mak | 10 ++++++++-- 3 files changed, 22 insertions(+), 7 deletions(-) diff --git a/configure b/configure index ea42fe2..5ae203d 100755 --- a/configure +++ b/configure @@ -3721,7 +3721,13 @@ echo "MAKE=$make" >> $config_host_mak echo "INSTALL=$install" >> $config_host_mak echo "INSTALL_DIR=$install -d -m 0755" >> $config_host_mak echo "INSTALL_DATA=$install -c -m 0644" >> $config_host_mak -echo "INSTALL_PROG=$install -c -m 0755" >> $config_host_mak +if test -n "$libtool"; then + echo "INSTALL_PROG=\$(LIBTOOL) --mode=install $install -c -m 0755" >> $config_host_mak + echo "INSTALL_LIB=\$(LIBTOOL) --mode=install $install -c -m 0644" >> $config_host_mak +else + echo "INSTALL_PROG=$install -c -m 0755" >> $config_host_mak + echo "INSTALL_LIB=$install -c -m 0644" >> $config_host_mak +fi echo "PYTHON=$python" >> $config_host_mak echo "CC=$cc" >> $config_host_mak echo "CC_I386=$cc_i386" >> $config_host_mak diff --git a/libcacard/Makefile b/libcacard/Makefile index 9fa109f..34d503b 100644 --- a/libcacard/Makefile +++ b/libcacard/Makefile @@ -10,6 +10,9 @@ $(call set-vpath, $(SRC_PATH)) QEMU_OBJS=$(oslib-obj-y) qemu-timer-common.o $(trace-obj-y) $(stub-obj-y) QEMU_OBJS_LIB=$(patsubst %.o,%.lo,$(QEMU_OBJS)) +# libtool will build the .o files, too +$(libcacard-obj-y): | $(libcacard-lobj-y) + QEMU_CFLAGS+=-I../ libcacard.lib-y=$(patsubst %.o,%.lo,$(libcacard-y)) @@ -54,10 +57,10 @@ install-libcacard: libcacard.pc libcacard.la vscclient $(INSTALL_DIR) "$(DESTDIR)$(libdir)/pkgconfig" $(INSTALL_DIR) "$(DESTDIR)$(libcacard_includedir)" $(INSTALL_DIR) "$(DESTDIR)$(bindir)" - $(LIBTOOL) --mode=install $(INSTALL_PROG) vscclient "$(DESTDIR)$(bindir)" - $(LIBTOOL) --mode=install $(INSTALL_DATA) libcacard.la "$(DESTDIR)$(libdir)" - $(LIBTOOL) --mode=install $(INSTALL_DATA) libcacard.pc "$(DESTDIR)$(libdir)/pkgconfig" + $(INSTALL_PROG) vscclient "$(DESTDIR)$(bindir)" + $(INSTALL_LIB) libcacard.la "$(DESTDIR)$(libdir)" + $(INSTALL_DATA) libcacard.pc "$(DESTDIR)$(libdir)/pkgconfig" for inc in *.h; do \ - $(LIBTOOL) --mode=install $(INSTALL_DATA) $(libcacard_srcpath)/$$inc "$(DESTDIR)$(libcacard_includedir)"; \ + $(INSTALL_DATA) $(libcacard_srcpath)/$$inc "$(DESTDIR)$(libcacard_includedir)"; \ done endif diff --git a/rules.mak b/rules.mak index 9273012..4673aad 100644 --- a/rules.mak +++ b/rules.mak @@ -23,10 +23,18 @@ QEMU_CFLAGS += -I$(