[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: libtool and libraries
From: |
Bob Friesenhahn |
Subject: |
Re: libtool and libraries |
Date: |
Fri, 1 Oct 2004 20:36:01 -0500 (CDT) |
On Fri, 1 Oct 2004, v p wrote:
Hi,
I am a newbie and trying to use the auto tools to build my project. I
am using libtool(with autoconf/automake) to build static as well as
shared libraries. When I do 'make' the libraries are created under
'src' directory in directory '.libs'. I want the make file( generated
using automake) to create/copy these libraries to 'lib' directory
under my project root. I don't want to use 'make install' for that.
What should I do??
install-my-libs:
for library in $(lib_LTLIBRARIES) ; do \
$(LIBTOOL) --mode=install $(INSTALL) $library
/usr/local/lib/$library ; \
done
should work. Then you can do 'make install-my-libs' to install just
the libraries rather than 'make install'.
A more complete version can already be found as the
'install-libLTLIBRARIES' target in Automake makefiles so you could just use
install-my-libs: install-libLTLIBRARIES
Here is the Automake version:
install-libLTLIBRARIES: $(lib_LTLIBRARIES)
@$(NORMAL_INSTALL)
test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)"
@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
if test -f $$p; then \
f=$(am__strip_dir) \
echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL)
$(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \
$(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG)
"$$p" "$(DESTDIR)$(libdir)/$$f"; \
else :; fi; \
done
Bob
======================================
Bob Friesenhahn
address@hidden
http://www.simplesystems.org/users/bfriesen