# Generated automatically from Makefile.in by configure.
#
# Copyright (C) 1997 - 2000  Heinz Mauelshagen, Germany
#
# February 1997
# January 1999
#
# lvm tools are free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# 
# lvm tools are distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
# 
# You should have received a copy of the GNU General Public License
# along with GNU CC; see the file COPYING.  If not, write to
# the Free Software Foundation, 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA. 
#
#



SUBDIRS = .
TOP = ../..
srcdir = .

include ../../make.tmpl
include ../tools_and_lib.make.tmpl

ARCHIVE = liblvm-10.a
SOV = liblvm-10.so.1.0
SOM = liblvm-10.so.1
SO = liblvm-10.so

ALL_RM = $(ALL_OBJECTS) $(ALL_POBJECTS) $(ARCHIVE) $(SO) $(SOM) $(SOV)

all_this: $(ARCHIVE) $(SO) Makefile
	@echo ""
	@echo "Done Library parts"
	@echo ""

install_this:
	@echo "*** Installing $(ARCHIVE) in $(staticlibdir) and $(SO) in $(libdir) ***"
	@rm -f $(DESTDIR)$(libdir)/${SO} $(DESTDIR)$(libdir)/${SOV} $(DESTDIR)$(libdir)/${SOM} $(DESTDIR)$(libdir)/$(ARCHIVE) $(DESTDIR)$(staticlibdir)/$(ARCHIVE);
	/usr/bin/install -c -d $(DESTDIR)$(libdir)
	/usr/bin/install -c -d $(DESTDIR)$(staticlibdir)
	/usr/bin/install -c -o $(OWNER) -g $(GROUP) $(SOV) $(DESTDIR)$(libdir)
	/usr/bin/install -c -o $(OWNER) -g $(GROUP) $(ARCHIVE) $(DESTDIR)$(staticlibdir)
	chmod 444 $(DESTDIR)$(staticlibdir)/$(ARCHIVE)
	chmod 555 $(DESTDIR)$(libdir)/$(SOV)
	ln -s $(SOV) $(DESTDIR)$(libdir)/${SO}
	ln -s $(SOV) $(DESTDIR)$(libdir)/${SOM}

remove_this:
	@echo "*** Removing $(ARCHIVE) from $(staticlibdir) and $(SO) from $(libdir) ***"
	@rm -f $(DESTDIR)$(libdir)/${SO} $(DESTDIR)$(libdir)/${SOV} \
		$(DESTDIR)$(libdir)/${SOM} $(DESTDIR)$(staticlibdir)/$(ARCHIVE);

$(ALL_SOURCES):	liblvm.h $(OTHER_DEP)

$(ALL_OBJECTS):	liblvm.h $(OTHER_DEP)

$(ALL_POBJECTS): liblvm.h $(OTHER_DEP)

$(ARCHIVE): $(ALL_OBJECTS)
	@echo "Making User parts"
	rm -f $(ARCHIVE)
	ar r $(ARCHIVE) $(ALL_OBJECTS)
	ranlib $@

$(SO):	$(ALL_POBJECTS)
	$(CC) -shared -Wl,-soname,$(SOM) -o $(SOV) $(ALL_POBJECTS)
	ln -sf $(SOV) $(SOM)
	ln -sf $(SOV) $(SO)

clean_this:
	rm -f $(ALL_RM)

distclean: clean
	rm -f Makefile lvm.h
